comparison gtk/gtkaccount.c @ 15019:c3b0f0924773

[gaim-migrate @ 17800] We shouldn't be freeing kvp->value, which is put in the list store as G_TYPE_POINTER. This was causing crashes for people editing SILC accounts (nothing else uses GAIM_PREF_STRING_LIST). committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 21 Nov 2006 05:32:55 +0000
parents f92232fcde41
children 2d3c7f76cea0
comparison
equal deleted inserted replaced
15018:40364ce5d6e3 15019:c3b0f0924773
808 /* Loop through list of GaimKeyValuePair items */ 808 /* Loop through list of GaimKeyValuePair items */
809 for (node = list; node != NULL; node = node->next) { 809 for (node = list; node != NULL; node = node->next) {
810 if (node->data != NULL) { 810 if (node->data != NULL) {
811 kvp = (GaimKeyValuePair *) node->data; 811 kvp = (GaimKeyValuePair *) node->data;
812 if ((kvp->value != NULL) && (str_value != NULL) && 812 if ((kvp->value != NULL) && (str_value != NULL) &&
813 !g_utf8_collate(kvp->value, str_value)) 813 !g_utf8_collate(kvp->value, str_value))
814 idx = i; 814 idx = i;
815 815
816 gtk_list_store_append(model, &iter); 816 gtk_list_store_append(model, &iter);
817 gtk_list_store_set(model, &iter, 817 gtk_list_store_set(model, &iter,
818 0, kvp->key, 818 0, kvp->key,
1245 1245
1246 case GAIM_PREF_STRING_LIST: 1246 case GAIM_PREF_STRING_LIST:
1247 gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter); 1247 gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widget), &iter);
1248 gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(widget)), &iter, 1, &value2, -1); 1248 gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(widget)), &iter, 1, &value2, -1);
1249 gaim_account_set_string(account, setting, value2); 1249 gaim_account_set_string(account, setting, value2);
1250 g_free(value2);
1251 break; 1250 break;
1252 1251
1253 default: 1252 default:
1254 break; 1253 break;
1255 } 1254 }