[vlc-commits] macosx: fixed corner-case crash
Felix Paul Kühne
git at videolan.org
Sun May 1 13:31:03 CEST 2011
vlc/vlc-1.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun May 1 13:30:33 2011 +0200| [d0244fbf11ef1d4d2bb4d342e61daa40c17744fd] | committer: Felix Paul Kühne
macosx: fixed corner-case crash
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=d0244fbf11ef1d4d2bb4d342e61daa40c17744fd
---
modules/gui/macosx/embeddedwindow.m | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index 387f197..a4ffedd 100644
--- a/modules/gui/macosx/embeddedwindow.m
+++ b/modules/gui/macosx/embeddedwindow.m
@@ -425,22 +425,24 @@
vout_thread_t *p_vout = getVout();
BOOL blackout_other_displays = config_GetInt( VLCIntf, "macosx-black" );
- screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_GetInteger( p_vout, "video-device" )];
+ if( p_vout )
+ screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_GetInteger( p_vout, "video-device" )];
[self lockFullscreenAnimation];
if (!screen)
{
- msg_Dbg( p_vout, "chosen screen isn't present, using current screen for fullscreen mode" );
+ msg_Dbg( VLCIntf, "chosen screen isn't present, using current screen for fullscreen mode" );
screen = [self screen];
}
if (!screen)
{
- msg_Dbg( p_vout, "Using deepest screen" );
+ msg_Dbg( VLCIntf, "Using deepest screen" );
screen = [NSScreen deepestScreen];
}
- vlc_object_release( p_vout );
+ if( p_vout )
+ vlc_object_release( p_vout );
screen_rect = [screen frame];
More information about the vlc-commits
mailing list