changeset 20868:a7733677ee20

I'm not sure if this is possible unless the combo box doesn't have any entries. Fixes CID 305
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 10 Oct 2007 01:45:37 +0000
parents faabcb979ac2
children c026361d4e63
files pidgin/gtkaccount.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkaccount.c	Wed Oct 10 01:39:20 2007 +0000
+++ b/pidgin/gtkaccount.c	Wed Oct 10 01:45:37 2007 +0000
@@ -1328,8 +1328,9 @@
 					break;
 
 				case PURPLE_PREF_STRING_LIST:
-					gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter);
-					gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(widget)), &iter, 1, &value2, -1);
+					value2 = NULL;
+					if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter))
+						gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(widget)), &iter, 1, &value2, -1);
 					purple_account_set_string(account, setting, value2);
 					break;