diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-10-05 13:32:34 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-10-05 13:32:34 +0400 |
commit | e79ef75db36ac7a269682e5309da97c10860a2f3 (patch) | |
tree | bc5d9fe7418372b4361a0d672b1f699f8f631209 /main/src/addins/MonoDevelop.SourceEditor2 | |
parent | ddb656d91929ca46b3a70df9e7337ca0fcd3c3ba (diff) |
Fixed "Bug 1679 - Exception while clicking on errors".
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2')
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs index 7196785275..3c03c94bd9 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs @@ -257,20 +257,20 @@ namespace MonoDevelop.SourceEditor void HandleTaskServiceJumpedToTask (object sender, TaskEventArgs e) { - Task task = e.Tasks.FirstOrDefault (); + var task = e.Tasks != null ? e.Tasks.FirstOrDefault () : null; var doc = Document; if (task == null || doc == null || task.FileName != doc.FileName || this.TextEditor == null) return; - LineSegment lineSegment = doc.GetLine (task.Line); + var lineSegment = doc.GetLine (task.Line); if (lineSegment == null) return; - MessageBubbleTextMarker marker = (MessageBubbleTextMarker)lineSegment.Markers.FirstOrDefault (m => m is MessageBubbleTextMarker); + var marker = (MessageBubbleTextMarker)lineSegment.Markers.FirstOrDefault (m => m is MessageBubbleTextMarker); if (marker == null) return; marker.SetPrimaryError (task.Description); - if (TextEditor.IsComposited) { + if (TextEditor != null && TextEditor.IsComposited) { if (messageBubbleHighlightPopupWindow != null) messageBubbleHighlightPopupWindow.Destroy (); messageBubbleHighlightPopupWindow = new MessageBubbleHighlightPopupWindow (this, marker); |