summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-02-08 23:08:56 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-02-08 23:08:56 +0100
commite6a466562dd3356781ffc6381abccebb26440246 (patch)
treeac67b7a8647674d694745e7563604f83df480beb /main.c
parent0dc9580e6e48db3cec8d5f8fd0723488e2988732 (diff)
fixed bug #1050: crash when loading playlist from cmdline
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 1 insertions, 4 deletions
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);
}
}