Skip to content

Commit

Permalink
gtkui: fix drag-dropping from filemanager to the end of playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Mar 25, 2024
1 parent a86ed4f commit e7aa955
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/gtkui/fileman.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,13 @@ gtkui_receive_fm_drop (DB_playItem_t *before, char *mem, int length) {
gtkui_dispatch_on_main(^{
ddb_undo->set_action_name (_("Drag & Drop"));

ddb_playItem_t *after = deadbeef->pl_get_prev(data->drop_before, PL_MAIN);
ddb_playItem_t *after;
if (data->drop_before != NULL) {
after = deadbeef->pl_get_prev(data->drop_before, PL_MAIN);
}
else {
after = deadbeef->plt_get_last(plt_curr, PL_MAIN);
}
deadbeef->plt_move_all_items (plt_curr, plt, after);
if (after != NULL) {
deadbeef->pl_item_unref (after);
Expand Down

0 comments on commit e7aa955

Please sign in to comment.