[vlc-commits] macosx: source list: protect against bogous events without selection
    David Fuhrmann 
    git at videolan.org
       
    Tue Sep 17 18:51:19 CEST 2019
    
    
  
vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Tue Sep 17 18:48:48 2019 +0200| [efd4c666625860ca6557eba740b86f915e6a3966] | committer: David Fuhrmann
macosx: source list: protect against bogous events without selection
Method is occasionally called even if no item is selected, leading to
a crash.
should fix #22767
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=efd4c666625860ca6557eba740b86f915e6a3966
---
 modules/gui/macosx/VLCMainWindow.m | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index d9bbb9556e..6190781805 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -1076,6 +1076,9 @@ static const float f_min_window_height = 307.;
     playlist_t * p_playlist = pl_Get(getIntf());
 
     NSIndexSet *selectedIndexes = [_sidebarView selectedRowIndexes];
+    if (selectedIndexes.count == 0)
+        return;
+
     id item = [_sidebarView itemAtRow:[selectedIndexes firstIndex]];
 
     //Set the label text to represent the new selection
    
    
More information about the vlc-commits
mailing list