Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
[macdoc] Protect against NRE in the search field when typing Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
garuma committed May 8, 2013
1 parent 327532f commit e052103
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MyDocument.cs
Expand Up @@ -389,7 +389,8 @@ void ShowMultipleMatches ()
tabSelector.SelectAt (2);
Search (contents);
// Unselect the search term in case user is typing slowly
sender.CurrentEditor.SelectedRange = new NSRange (contents.Length, 0);
if (sender.CurrentEditor != null)
sender.CurrentEditor.SelectedRange = new NSRange (contents.Length, 0);
}

// Typing in the index panel
Expand Down

0 comments on commit e052103

Please sign in to comment.