accounts-dialog: early return if gtk_tree_view_get_selection returns NULL
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 25 Oct 2013 08:46:42 +0000 (10:46 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 25 Oct 2013 09:44:41 +0000 (11:44 +0200)
src/empathy-accounts-dialog.c

index 83f1334..76b460a 100644 (file)
@@ -279,6 +279,8 @@ account_is_selected (EmpathyAccountsDialog *dialog,
     return FALSE;
 
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
+  if (selection == NULL)
+    return FALSE;
 
   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
     return FALSE;