summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-03 21:19:40 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-03 22:10:09 +0200
commita80c2c23bc62ea1e03d539c6c8a7b38c96eb0438 (patch)
tree1da668bd4cca1afb522c227bf0a644fa2aaf3347 /plugins
parentacde0cc1fdab30b1eafa74c40f3ab86f9e0325a2 (diff)
gtkui: fixed crash after attempting to add location with empty URL
Diffstat (limited to 'plugins')
-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) {