[gnome-contacts] Squash a critical warning when the application is closed.



commit 4b5ffd327b3f245bb63583f5744498950491b5bb
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Oct 28 18:26:58 2012 +0100

    Squash a critical warning when the application is closed.
    
    Destroying the EggListBox will emit child-selected with a null child.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687049

 src/contacts-view.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-view.vala b/src/contacts-view.vala
index 072611f..a273cbf 100644
--- a/src/contacts-view.vala
+++ b/src/contacts-view.vala
@@ -242,7 +242,7 @@ public class Contacts.View : Egg.ListBox {
   }
 
   public override void child_selected (Widget? child) {
-    var data = child.get_data<ContactData> ("data");
+    var data = child != null ? child.get_data<ContactData> ("data") : null;
     var contact = data != null ? data.contact : null;
     selection_changed (contact);
     if (contact != null)



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