Commit 127ffb40 authored by David Fuhrmann's avatar David Fuhrmann

macosx: avoid index out of bound exceptions in some cases

(cherry picked from commit 2aa0ad9c3da62df3f31ff317bd747eb0b8524b71)
Signed-off-by: default avatarDavid Fuhrmann <david.fuhrmann@googlemail.com>
parent 2a025f5d
...@@ -1832,6 +1832,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1832,6 +1832,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)hasBecomeFullscreen - (void)hasBecomeFullscreen
{ {
if( [[o_video_view subviews] count] > 0 )
[o_fullscreen_window makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]]; [o_fullscreen_window makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
[o_fullscreen_window makeKeyWindow]; [o_fullscreen_window makeKeyWindow];
...@@ -1993,6 +1994,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1993,6 +1994,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[o_temp_view superview] replaceSubview:o_temp_view with:o_video_view]; [[o_temp_view superview] replaceSubview:o_temp_view with:o_video_view];
[o_video_view release]; [o_video_view release];
[o_video_view setFrame:[o_temp_view frame]]; [o_video_view setFrame:[o_temp_view frame]];
if( [[o_video_view subviews] count] > 0 )
[[o_video_view window] makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]]; [[o_video_view window] makeFirstResponder: [[o_video_view subviews] objectAtIndex:0]];
if( [[o_video_view window] isVisible] ) if( [[o_video_view window] isVisible] )
{ {
......
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