Commit 98a2c4f8 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

macosx: fixed corner-case crash

parent 75e52d8c
/*****************************************************************************
* embeddedwindow.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2005-2008 the VideoLAN team
* Copyright (C) 2005-2011 the VideoLAN team
* $Id$
*
* Authors: Benjamin Pracht <bigben at videolan dot org>
......@@ -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];
......
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