From e6a466562dd3356781ffc6381abccebb26440246 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sat, 8 Feb 2014 23:08:56 +0100 Subject: fixed bug #1050: crash when loading playlist from cmdline --- main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 1813a720..01ce8d54 100644 --- a/main.c +++ b/main.c @@ -319,10 +319,7 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi if (deadbeef->plt_add_file2 (0, (ddb_playlist_t*)curr_plt, pname, NULL, NULL) < 0) { int ab = 0; playItem_t *it = plt_load2 (0, curr_plt, NULL, pname, &ab, NULL, NULL); - if (it) { - pl_item_unref (it); - } - else { + if (!it) { fprintf (stderr, "failed to add file or folder %s\n", pname); } } -- cgit v1.2.3