Commit 8e88b0c1 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/VLC_app/VLCBrowsableVideoView.m: Don't crash on empty playlist.

parent 88e63b3b
......@@ -320,8 +320,10 @@
[[self layer] addSublayer:selectionLayer];
}
NSArray * items = [self.itemsTree objectAtIndexPath:selectedPath withNodeKeyPath:self.nodeKeyPath];
if( i < 0 ) i = 0;
if( [items count] <= 0 )
return;
if( i >= [items count] ) i = [items count] - 1;
if( i < 0 ) i = 0;
CALayer * layer = [[menuLayer sublayers] objectAtIndex: i];
CGRect frame = layer.frame;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment