]> git.sesse.net Git - vlc/commitdiff
macosx: handle corner case in playlist deletion (refs #11735)
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 13 Jul 2014 15:52:02 +0000 (17:52 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 13 Jul 2014 15:52:02 +0000 (17:52 +0200)
modules/gui/macosx/playlist.m

index 0e68a17e4c904e643444c6e241b2cbc53a647651..d3a71ef4ae208b4b449099c8945d171840813545 100644 (file)
     BOOL b_selected_item_met;
     BOOL b_isSortDescending;
     id o_tc_sortColumn;
-    NSInteger retainedRowSelection;
+    NSUInteger retainedRowSelection;
 
     BOOL b_playlistmenu_nib_loaded;
     BOOL b_view_setup;
     o_selected_indexes = [o_outline_view selectedRowIndexes];
     i_count = [o_selected_indexes count];
     retainedRowSelection = [o_selected_indexes firstIndex];
+    if (retainedRowSelection == NSNotFound)
+        retainedRowSelection = 0;
 
     p_playlist = pl_Get(p_intf);