Mercurial > pidgin
changeset 19135:3ec3d55a1e37
FIX: Setting combo_box doesn't cause memory corruption.
author | Eric Polino <aluink@pidgin.im> |
---|---|
date | Thu, 05 Jul 2007 18:15:32 +0000 |
parents | 2c7114561553 |
children | 6b85cbfc80b7 |
files | finch/gntsound.c |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntsound.c Fri Jun 29 21:59:48 2007 +0000 +++ b/finch/gntsound.c Thu Jul 05 18:15:32 2007 +0000 @@ -603,7 +603,6 @@ GntWidget *label; GntWidget *win; - gchar *buf; if(pref_dialog){ gnt_window_present(pref_dialog->window); @@ -628,9 +627,7 @@ gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"beep",_("Console Beep")); gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"custom",_("Command")); gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"nosound",_("No Sound")); - buf = g_strdup(purple_prefs_get_string(FINCH_PREFS_ROOT "/sound/method")); - gnt_combo_box_set_selected(GNT_COMBO_BOX(cmbox),buf); - g_free(buf); + gnt_combo_box_set_selected(GNT_COMBO_BOX(cmbox),(gchar *)purple_prefs_get_string(FINCH_PREFS_ROOT "/sound/method")); label = gnt_label_new_with_format(_("Sound Method"),GNT_TEXT_FLAG_BOLD); gnt_box_add_widget(GNT_BOX(win),label);