[vlc-commits] macosx: handle corner case in playlist deletion (refs #11735)

David Fuhrmann git at videolan.org
Sat Jul 26 01:19:57 CEST 2014


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jul 13 17:52:02 2014 +0200| [cc341c945e3e231a5f2068b3742f88381da34d21] | committer: Jean-Baptiste Kempf

macosx: handle corner case in playlist deletion (refs #11735)

(cherry picked from commit 1e5bed0fb7b15823097064b62fcf9b49ef5d9e12)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=cc341c945e3e231a5f2068b3742f88381da34d21
---

 modules/gui/macosx/playlist.m |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 0e68a17..d3a71ef 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -469,7 +469,7 @@
     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;
@@ -968,6 +968,8 @@
     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);
 



More information about the vlc-commits mailing list