summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Polino <aluink@pidgin.im>2007-07-05 18:15:32 +0000
committerEric Polino <aluink@pidgin.im>2007-07-05 18:15:32 +0000
commitd05bde70fe2414da1a1284aec40e75c580805766 (patch)
treefb93e72a6292cd05100bab8f82ba9524688ab4a5
parent05971b7e6d9945b3a9bec9cfca6e97aa7340dba3 (diff)
downloadpidgin-d05bde70fe2414da1a1284aec40e75c580805766.tar.gz
FIX: Setting combo_box doesn't cause memory corruption.
-rw-r--r--finch/gntsound.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/finch/gntsound.c b/finch/gntsound.c
index 251ab12bdf..44084181e0 100644
--- a/finch/gntsound.c
+++ b/finch/gntsound.c
@@ -603,7 +603,6 @@ finch_sounds_show_all(void)
GntWidget *label;
GntWidget *win;
- gchar *buf;
if(pref_dialog){
gnt_window_present(pref_dialog->window);
@@ -628,9 +627,7 @@ finch_sounds_show_all(void)
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);