Browse Source

Fixed SD2-1207 - Closing a file with the code completion window still open disposes the text editor before the completion window causing a null reference exception. The AbstractCodeCompletion window now checks that TextAreaControl's scroll bars are not null when it closes.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2060 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 19 years ago
parent
commit
b34730f04a
  1. 8
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs

8
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs

@ -170,8 +170,12 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow @@ -170,8 +170,12 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow
// take out the inserted methods
parentForm.LocationChanged -= new EventHandler(ParentFormLocationChanged);
control.ActiveTextAreaControl.VScrollBar.ValueChanged -= new EventHandler(ParentFormLocationChanged);
control.ActiveTextAreaControl.HScrollBar.ValueChanged -= new EventHandler(ParentFormLocationChanged);
if (control.ActiveTextAreaControl.VScrollBar != null) {
control.ActiveTextAreaControl.VScrollBar.ValueChanged -= new EventHandler(ParentFormLocationChanged);
}
if (control.ActiveTextAreaControl.HScrollBar != null) {
control.ActiveTextAreaControl.HScrollBar.ValueChanged -= new EventHandler(ParentFormLocationChanged);
}
control.ActiveTextAreaControl.TextArea.LostFocus -= new EventHandler(this.TextEditorLostFocus);
control.ActiveTextAreaControl.Caret.PositionChanged -= new EventHandler(CaretOffsetChanged);

Loading…
Cancel
Save