Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Laval <jeremie.laval@gmail.com>2013-05-09 01:39:38 +0400
committerJérémie Laval <jeremie.laval@gmail.com>2013-05-09 01:39:38 +0400
commite052103e7354644df330df5cc5d225b4c28d61bd (patch)
treecc86e5cca0847da54bb4fd22d9d87e8796f1251f
parent327532f92ad7f6c9ea74894d071b91f1d67748f0 (diff)
[macdoc] Protect against NRE in the search field when typing Enter
-rw-r--r--MyDocument.cs3
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