]> git.sesse.net Git - vlc/commitdiff
minimal_macosx: Don't attempt to use the vout when there is none.
authorPierre d'Herbemont <pdherbemont@free.fr>
Sat, 10 Oct 2009 14:13:24 +0000 (16:13 +0200)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sat, 10 Oct 2009 14:29:40 +0000 (16:29 +0200)
modules/gui/minimal_macosx/VLCOpenGLVoutView.m

index 38ee22f6c61518f9324cae568ff84b5dd96102b5..8b50b4250c9c21b198e5e16991735bbbcbbb2314 100644 (file)
@@ -360,6 +360,8 @@ void cocoaglvoutviewUnlock( vout_thread_t * p_vout )
 
 - (void) update
 {
+    if (!p_vout)
+        return;
     if( kCGLNoError != CGLLockContext([[self openGLContext] CGLContextObj]) )
         return;
     [super update];
@@ -368,6 +370,8 @@ void cocoaglvoutviewUnlock( vout_thread_t * p_vout )
 
 - (void) drawRect: (NSRect) rect
 {
+    if (!p_vout)
+        return;
     if( kCGLNoError != CGLLockContext([[self openGLContext] CGLContextObj]) )
         return;
     [[self openGLContext] flushBuffer];