diff options
author | Jérémie Laval <jeremie.laval@gmail.com> | 2013-05-09 01:39:38 +0400 |
---|---|---|
committer | Jérémie Laval <jeremie.laval@gmail.com> | 2013-05-09 01:39:38 +0400 |
commit | e052103e7354644df330df5cc5d225b4c28d61bd (patch) | |
tree | cc86e5cca0847da54bb4fd22d9d87e8796f1251f | |
parent | 327532f92ad7f6c9ea74894d071b91f1d67748f0 (diff) |
[macdoc] Protect against NRE in the search field when typing Enter
-rw-r--r-- | MyDocument.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MyDocument.cs b/MyDocument.cs index e4fa4e6..b7e624d 100644 --- a/MyDocument.cs +++ b/MyDocument.cs @@ -389,7 +389,8 @@ namespace macdoc 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 |