summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-02-26 16:11:31 +0100
committerGravatar waker <wakeroid@gmail.com>2011-02-26 16:11:31 +0100
commit3a30d396a8b437d12fe8ad48a6c0cc30e27acf7e (patch)
tree93eccdb31b98b35592541314c136d9030d367c29 /main.c
parent54382e4b68e571e12905aa49048e9e80d0b6ef83 (diff)
fixed playlist corruption while adding files if cursor jumps to another playlist
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 7598160f..31176cb1 100644
--- a/main.c
+++ b/main.c
@@ -231,12 +231,13 @@ server_exec_command_line (const char *cmdline, int len, char *sendback, int sbsi
}
}
// add files
- if (!queue && plt_get_curr () != -1) {
+ int curr_plt = plt_get_curr ();
+ if (!queue) {
pl_clear ();
pl_reset_cursor ();
}
if (parg < pend) {
- deadbeef->pl_add_files_begin ();
+ deadbeef->pl_add_files_begin (curr_plt);
}
while (parg < pend) {
char resolved[PATH_MAX];