Skip to content

Commit 7530b30

Browse files
committed
Add null check for ICodePane before raising OnSelectionChange.
1 parent 58b650b commit 7530b30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rubberduck.VBEEditor/Events/VBEEvents.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private static void OnSelectionChanged(IntPtr hwnd)
136136
if (SelectionChanged != null)
137137
{
138138
var pane = GetCodePaneFromHwnd(hwnd);
139-
SelectionChanged.Invoke(_vbe, new SelectionChangedEventArgs(pane));
139+
if (pane != null) SelectionChanged.Invoke(_vbe, new SelectionChangedEventArgs(pane));
140140
}
141141
}
142142

0 commit comments

Comments
 (0)