summaryrefslogtreecommitdiffstats
path: root/gtk/src/subtitlehandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r--gtk/src/subtitlehandler.c9
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);