[geary] Fix a crash when sending mail to a conversartion email address.



commit 93f65eb60cd4002e41177ff2af16122ea2f592b7
Author: Michael James Gratton <mike vee net>
Date:   Sat Oct 8 17:43:21 2016 +1100

    Fix a crash when sending mail to a conversartion email address.
    
    * src/client/composer/email-entry.vala (EmailEntry::on_changed): Now that
      the completion is being lazily added, we need to check the completion
      is null before using it.

 src/client/composer/email-entry.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/client/composer/email-entry.vala b/src/client/composer/email-entry.vala
index 5a1b9a3..04f27e4 100644
--- a/src/client/composer/email-entry.vala
+++ b/src/client/composer/email-entry.vala
@@ -42,7 +42,11 @@ public class EmailEntry : Gtk.Entry {
             return;
         modified = true;
 
-        ((ContactEntryCompletion) get_completion()).reset_selection();
+        ContactEntryCompletion? completion = get_completion() as ContactEntryCompletion;
+        if (completion != null) {
+            completion.reset_selection();
+        }
+
         if (Geary.String.is_empty(text.strip())) {
             updating = true;
             addresses = null;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]