diff options
author | jstebbins <[email protected]> | 2014-02-21 00:23:37 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-02-21 00:23:37 +0000 |
commit | d206a74fb8500b64310b75be8db08ec9e0a972f5 (patch) | |
tree | 15941705a5f17d83f29e2b28fc1d548fe5aab9e3 /gtk/src/subtitlehandler.c | |
parent | cc82c19b2f52a7527615ccbae34154e0085b6708 (diff) |
LinGui: fix range update issues and plug memory leaks
Updating the range of GtkScale and GtkSpinButtons causes the current
value to update inappropriately under some conditions. So update
the range and value concurrently.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6051 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r-- | gtk/src/subtitlehandler.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c index 9fc959666..6065f5a4a 100644 --- a/gtk/src/subtitlehandler.c +++ b/gtk/src/subtitlehandler.c @@ -1165,7 +1165,9 @@ ghb_subtitle_prune(signal_user_data_t *ud) burned = burned || !hb_subtitle_can_pass(source, mux); if (burned && one_burned) { + GValue *gsub = ghb_array_get_nth(subtitle_list, ii); ghb_array_remove(subtitle_list, ii); + ghb_value_free(gsub); continue; } one_burned = one_burned || burned; @@ -1319,7 +1321,10 @@ subtitle_remove_lang_clicked_cb(GtkWidget *widget, signal_user_data_t *ud) // Remove from preset language list lang_list = ghb_settings_get_value(ud->settings, "SubtitleLanguageList"); + GValue *glang = ghb_array_get_nth(lang_list, index); ghb_array_remove(lang_list, index); + ghb_value_free(glang); + ghb_clear_presets_selection(ud); if (ghb_array_len(lang_list) > 0) @@ -1401,7 +1406,9 @@ static void subtitle_def_lang_list_init(signal_user_data_t *ud) { // Error in list. Probably duplicate languages. Remove // this item from the list. + GValue *glang = ghb_array_get_nth(lang_list, ii); ghb_array_remove(lang_list, ii); + ghb_value_free(glang); count--; } } @@ -1519,8 +1526,8 @@ subtitle_remove_clicked_cb(GtkWidget *widget, gchar *path, signal_user_data_t *u // immediate selection change, so the list needs to be up to date // when this happens. GValue *old = ghb_array_get_nth(subtitle_list, row); - ghb_value_free(old); ghb_array_remove(subtitle_list, row); + ghb_value_free(old); // Remove the selected item gtk_tree_store_remove(GTK_TREE_STORE(tm), &ti); |