summaryrefslogtreecommitdiff
path: root/plugins/gtkui/fileman.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui/fileman.c')
-rw-r--r--plugins/gtkui/fileman.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/gtkui/fileman.c b/plugins/gtkui/fileman.c
index b1fa28af..1ae8b4aa 100644
--- a/plugins/gtkui/fileman.c
+++ b/plugins/gtkui/fileman.c
@@ -197,6 +197,7 @@ gtkpl_add_fm_dropped_files (DB_playItem_t *drop_before, char *ptr, int length) {
deadbeef->pl_item_unref (after);
}
after = inserted;
+ deadbeef->pl_item_ref (after);
}
}
p = pe;
@@ -205,6 +206,9 @@ gtkpl_add_fm_dropped_files (DB_playItem_t *drop_before, char *ptr, int length) {
p++;
}
}
+ if (after) {
+ deadbeef->pl_item_unref (after);
+ }
free (ptr);
g_idle_add (progress_hide_idle, NULL);