diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-02-08 23:08:56 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-02-08 23:08:56 +0100 |
commit | e6a466562dd3356781ffc6381abccebb26440246 (patch) | |
tree | ac67b7a8647674d694745e7563604f83df480beb /main.c | |
parent | 0dc9580e6e48db3cec8d5f8fd0723488e2988732 (diff) |
fixed bug #1050: crash when loading playlist from cmdline
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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); } } |