diff options
author | 2009-12-28 18:46:17 +0100 | |
---|---|---|
committer | 2009-12-28 18:52:29 +0100 | |
commit | 50bd3ec6e2a8f0d9c5073aad0f9b0b997fcc4ccb (patch) | |
tree | 69f9a79d0b5d4a31e5d03bb7ad13f301180e0608 /plugins/gtkui/callbacks.c | |
parent | 5dfac08f5ab93c46d0479971496e7252248c84b2 (diff) |
fixed few issues with cursor positioning
Diffstat (limited to 'plugins/gtkui/callbacks.c')
-rw-r--r-- | plugins/gtkui/callbacks.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 8d82b8c4..31bdb4e8 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -517,6 +517,9 @@ on_remove1_activate (GtkMenuItem *menuitem, gtkplaylist_t *ps = &main_playlist; GtkWidget *widget = ps->playlist; int row = deadbeef->pl_delete_selected (); + if (row >= ps->get_count ()) { + row = ps->get_count ()-1; + } deadbeef->pl_set_cursor (PL_MAIN, row); if (row != -1) { DB_playItem_t *it = deadbeef->pl_get_for_idx (row); |