diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-10-28 17:16:34 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-10-28 17:16:34 +0400 |
commit | 56696edda65fcbadf986f67bbeceedc199058d42 (patch) | |
tree | fab3dee1bfedd6c360c4904449aad4764abffcd0 /main/src/addins/CSharpBinding | |
parent | ca68b36142c26b1899a9cbf6c3d4239830b05958 (diff) |
Fixed "Bug 1750 - [New Resolver] Crash in the editor".
Diffstat (limited to 'main/src/addins/CSharpBinding')
-rw-r--r-- | main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs index eedcbc38f3..878c6307c9 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs @@ -172,6 +172,8 @@ namespace MonoDevelop.CSharp.Completion } else if (textEditorData.CurrentMode is Mono.TextEditor.TextLinkEditMode) { return null; } + if (Unit == null || CSharpParsedFile == null) + return null; var list = new CompletionDataList (); var engine = new CSharpCompletionEngine (textEditorData.Document, this); engine.ctx = ctx; @@ -313,6 +315,8 @@ namespace MonoDevelop.CSharp.Completion { if (!TextEditorProperties.EnableCodeCompletion) return null; + if (Unit == null || CSharpParsedFile == null) + return null; var engine = new CSharpParameterCompletionEngine (textEditorData.Document, this); engine.ctx = ctx; engine.Unit = Unit; |