]> git.sesse.net Git - vlc/blobdiff - modules/gui/minimal_macosx/VLCOpenGLVoutView.m
minimal_macosx: Don't attempt to use the vout when there is none.
[vlc] / 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];