[vlc-commits] vout_macosx: fix prerequisite check in Control() (close #7937)

Felix Paul Kühne git at videolan.org
Wed Apr 10 17:07:53 CEST 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Apr 10 17:07:08 2013 +0200| [ba534e5c56e1d4d3d3bb37fe23b32615e36171ff] | committer: Felix Paul Kühne

vout_macosx: fix prerequisite check in Control() (close #7937)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba534e5c56e1d4d3d3bb37fe23b32615e36171ff
---

 modules/video_output/macosx.m |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 5fa24a7..20d11fd 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -315,6 +315,12 @@ static int Control (vout_display_t *vd, int query, va_list ap)
 {
     vout_display_sys_t *sys = vd->sys;
 
+    if (!vd->sys)
+        return VLC_EGENERIC;
+
+    if (!sys->embed)
+        return VLC_EGENERIC;
+
     switch (query)
     {
         case VOUT_DISPLAY_CHANGE_FULLSCREEN:
@@ -336,9 +342,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
         case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
         {
-            if (!vd->sys)
-                return VLC_EGENERIC;
-
             NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
 
             id o_window = [sys->glView window];



More information about the vlc-commits mailing list