summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/actionhandlers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/gtkui/actionhandlers.c b/plugins/gtkui/actionhandlers.c
index b032ddb8..f9fa9ecc 100644
--- a/plugins/gtkui/actionhandlers.c
+++ b/plugins/gtkui/actionhandlers.c
@@ -433,7 +433,7 @@ action_add_location_handler_cb (void *user_data) {
if (!deadbeef->plt_add_files_begin (plt, 0)) {
DB_playItem_t *tail = deadbeef->plt_get_last (plt, PL_MAIN);
DB_playItem_t *it = deadbeef->plt_insert_file2 (0, plt, tail, text, NULL, NULL, NULL);
- if (deadbeef->conf_get_int ("gtkui.location_set_custom_title", 0)) {
+ if (it && deadbeef->conf_get_int ("gtkui.location_set_custom_title", 0)) {
deadbeef->pl_replace_meta (it, "DDB:CUSTOM_TITLE", gtk_entry_get_text (GTK_ENTRY (ct)));
}
if (tail) {