Commit 2aa0ad9c authored by David Fuhrmann's avatar David Fuhrmann

macosx: avoid index out of bound exceptions in some cases

parent a159d154
......@@ -1835,7 +1835,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)hasBecomeFullscreen
{
[o_fullscreen_window makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
if( [[o_video_view subviews] count] > 0 )
[o_fullscreen_window makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
[o_fullscreen_window makeKeyWindow];
[o_fullscreen_window setAcceptsMouseMovedEvents: TRUE];
......@@ -1996,7 +1997,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[o_temp_view superview] replaceSubview:o_temp_view with:o_video_view];
[o_video_view release];
[o_video_view setFrame:[o_temp_view frame]];
[[o_video_view window] makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
if( [[o_video_view subviews] count] > 0 )
[[o_video_view window] makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
if( [[o_video_view window] isVisible] )
{
if( !b_nonembedded )
......
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