From a80c2c23bc62ea1e03d539c6c8a7b38c96eb0438 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 3 Jun 2014 21:19:40 +0200 Subject: gtkui: fixed crash after attempting to add location with empty URL --- plugins/gtkui/actionhandlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/gtkui') 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) { -- cgit v1.2.3