aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@src.gnome.org>2008-08-20 16:54:15 +0800
committerFrederic Peters <fpeters@src.gnome.org>2008-08-20 16:54:15 +0800
commita50bfdd4592569391bcc7c3e0193de66be0c88fc (patch)
tree78e5f392c9c31df94e202b8a330bc8a47bbe1687 /libempathy-gtk
parentf88563316b12c694871c5af564ad2a500bb66c51 (diff)
downloadgsoc2013-empathy-a50bfdd4592569391bcc7c3e0193de66be0c88fc.tar
gsoc2013-empathy-a50bfdd4592569391bcc7c3e0193de66be0c88fc.tar.gz
gsoc2013-empathy-a50bfdd4592569391bcc7c3e0193de66be0c88fc.tar.bz2
gsoc2013-empathy-a50bfdd4592569391bcc7c3e0193de66be0c88fc.tar.lz
gsoc2013-empathy-a50bfdd4592569391bcc7c3e0193de66be0c88fc.tar.xz
gsoc2013-empathy-a50bfdd4592569391bcc7c3e0193de66be0c88fc.tar.zst
gsoc2013-empathy-a50bfdd4592569391bcc7c3e0193de66be0c88fc.zip
check there is an account before accessing it; prevents a segfault when calling
up the 'previous conversations' dialog and there is no account configured. svn path=/trunk/; revision=1359
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-chooser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 13040b0dc..14e6e2786 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -244,7 +244,9 @@ empathy_account_chooser_get_account (EmpathyAccountChooser *chooser)
priv = GET_PRIV (chooser);
model = gtk_combo_box_get_model (GTK_COMBO_BOX (chooser));
- gtk_combo_box_get_active_iter (GTK_COMBO_BOX (chooser), &iter);
+ if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (chooser), &iter)) {
+ return NULL;
+ }
gtk_tree_model_get (model, &iter, COL_ACCOUNT_POINTER, &account, -1);