diff options
author | Matt Ward <matt.ward@microsoft.com> | 2019-06-07 11:39:39 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@microsoft.com> | 2019-06-07 11:39:39 +0300 |
commit | 802dd40cb71c74b9b99712bc62bc3dfe734ff9f5 (patch) | |
tree | 66e813e77e2ef5c9f752541fda46531031908f0b /main/src | |
parent | 4e10af1a49a584aa6956c550ab6f4ad7e075da0d (diff) |
[Ide] Handle exception disposing pad on closing the workbench.
An error disposing a pad on closing the workbench results in
a fatal exception which may crash the IDE. Handle any error on
disposing the pad with a try/catch.
Fixes VSTS #911276 - [Watson] Crash in PackageConsolePad
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs index 94fd3b1208..8ee60288a4 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs @@ -655,8 +655,13 @@ namespace MonoDevelop.Ide.Gui Remove (rootWidget); foreach (PadCodon content in PadContentCollection) { - if (content.Initialized) - content.PadContent.Dispose (); + if (content.Initialized) { + try { + content.PadContent.Dispose (); + } catch (Exception ex) { + LoggingService.LogInternalError ("Failed to dispose pad " + content.PadId, ex); + } + } } rootWidget.Destroy (); |