Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMike Krüger <mikkrg@microsoft.com>2019-10-22 11:53:20 +0300
committermonojenkins <jo.shields+jenkins@xamarin.com>2019-11-08 12:17:40 +0300
commit47d64cee4126a04d20be175f9dcf3202e95ad85f (patch)
tree290f03f1f57c91cf4d0ad6f844e2aa740a9ae818 /main
parent5454f45ce224ea74cdb5152de7e6e70150088068 (diff)
Fixes VSTS Bug 958249: System.InvalidOperationException exception in MonoDevelop.Ide.Gui.Components.LogViewProgressMonitor.OnWriteLog()
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/958249 Found some event handlers that were not unregistered on dispose which may explain that issue.
Diffstat (limited to 'main')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/ProgressMonitor.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/ProgressMonitor.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/ProgressMonitor.cs
index e0bad52376..02394f9e8d 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/ProgressMonitor.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/ProgressMonitor.cs
@@ -144,6 +144,17 @@ namespace MonoDevelop.Core
if (disposed)
return;
disposed = true;
+ if (logWriter != null) {
+ logWriter.TextWritten -= DoWriteLog;
+ logWriter.Dispose ();
+ logWriter = null;
+ }
+
+ if (errorLogWriter != null) {
+ errorLogWriter.TextWritten -= DoWriteErrorLog;
+ errorLogWriter.Dispose ();
+ errorLogWriter = null;
+ }
if (parentMonitor != null && firstCachedLogChunk != null) {
parentMonitor.DumpLog (firstCachedLogChunk);