# HG changeset patch # User ib # Date 1354545620 0 # Node ID 7b090d0f253b0bc41092e1ba4108b7907334f4e0 # Parent 4d2ebecd16057830a84f35af33abe13f5a9eae0d Only ask for playlist position if there is an item. diff -r 4d2ebecd1605 -r 7b090d0f253b gui/ui/gtk/playlist.c --- a/gui/ui/gtk/playlist.c Mon Dec 03 14:12:13 2012 +0000 +++ b/gui/ui/gtk/playlist.c Mon Dec 03 14:40:20 2012 +0000 @@ -194,16 +194,16 @@ { case 1: // ok { - int pos, i; + int pos = 0, i; plItem curr, * item, * old; item = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); if (item) { curr.path = gstrdup(item->path); curr.name = gstrdup(item->name); + pos = (int) listMgr( PLAYLIST_ITEM_GET_POS,item ); } else curr.path = curr.name = NULL; - pos = (int) listMgr( PLAYLIST_ITEM_GET_POS,item ); listMgr( PLAYLIST_DELETE,0 ); for ( i=0;i