diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-01-13 22:41:18 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-01-13 22:41:18 +0800 |
commit | e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1 (patch) | |
tree | e39a5b99abff570f8eeff829a8c5e4e09efa8cda /libempathy-gtk | |
parent | 362f0f152b4c84e0b0cb7a46ecc4a7386fea1726 (diff) | |
download | gsoc2013-empathy-e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1.tar gsoc2013-empathy-e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1.tar.gz gsoc2013-empathy-e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1.tar.bz2 gsoc2013-empathy-e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1.tar.lz gsoc2013-empathy-e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1.tar.xz gsoc2013-empathy-e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1.tar.zst gsoc2013-empathy-e1f5315d0733134b9ce40a40c1e8ffe2c4eb78b1.zip |
irc-network-chooser-dialog: be more NULL-safe
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-irc-network-chooser-dialog.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-irc-network-chooser-dialog.c b/libempathy-gtk/empathy-irc-network-chooser-dialog.c index 9d29aff4a..755eb584e 100644 --- a/libempathy-gtk/empathy-irc-network-chooser-dialog.c +++ b/libempathy-gtk/empathy-irc-network-chooser-dialog.c @@ -132,6 +132,9 @@ dup_selected_network (EmpathyIrcNetworkChooserDialog *self, GtkTreeModel *model; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview)); + if (selection == NULL) + return NULL; + if (!gtk_tree_selection_get_selected (selection, &model, &iter)) return NULL; @@ -157,7 +160,7 @@ treeview_changed_cb (GtkTreeView *treeview, network = dup_selected_network (self, NULL); if (network == priv->network) { - g_object_unref (network); + g_clear_object (&network); return; } |