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
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2017-05-23 10:28:33 +0300
committerMike Krüger <mkrueger@xamarin.com>2017-05-23 10:28:33 +0300
commit6841bceeeced8b4f7a0815f355ba258782c6e883 (patch)
treee027b83cfe13b160638c28ddcfe593842a00405b /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui
parent1721fc51cc5bbb59634b0d56a7ee3bc0eb028633 (diff)
[Ide] Added insanity check to prevent that that repasing is done after
dispose. Had a log that showed that the reparsing is tried on a disposed editor. Shouldn't happen in the current implementation but I added a check to ensure that's not happening.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
index 5aaf7270f3..60f06be244 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
@@ -959,9 +959,8 @@ namespace MonoDevelop.Ide.Gui
{
RunWhenRealized (() => {
string currentParseFile = GetCurrentParseFileName ();
- if (string.IsNullOrEmpty (currentParseFile))
- return;
-
+ if (string.IsNullOrEmpty (currentParseFile) || Editor.IsDisposed)
+ return;
lock (reparseTimeoutLock) {
CancelParseTimeout ();
@@ -984,7 +983,7 @@ namespace MonoDevelop.Ide.Gui
async void StartReparseThreadDelayed (FilePath currentParseFile)
{
var editor = Editor;
- if (editor == null)
+ if (editor == null || editor.IsDisposed)
return;
// Don't directly parse the document because doing it at every key press is