vlc/vlc-3.0 | branch: master | Thomas Guillem <tho...@gllm.fr> | Mon Mar  5 
15:31:55 2018 +0100| [ee27e61c100093f9457dc5150945614c49fb0800] | committer: 
Thomas Guillem

vout: ios: fix call order

Check nullity before using the glESView object.

(cherry picked from commit 960c66f6ae7f47bc179f297537e2d32d84ab53f3)
Signed-off-by: Thomas Guillem <tho...@gllm.fr>

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

 modules/video_output/ios.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 655381a8b0..f405e36c3c 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -162,13 +162,13 @@ static int Open(vlc_object_t *this)
         [VLCOpenGLES2VideoView 
performSelectorOnMainThread:@selector(getNewView:)
                                              withObject:[NSValue 
valueWithPointer:&sys->glESView]
                                           waitUntilDone:YES];
-        [sys->glESView setVoutDisplay:vd];
-
         if (!sys->glESView) {
             msg_Err(vd, "Creating OpenGL ES 2 view failed");
             goto bailout;
         }
 
+        [sys->glESView setVoutDisplay:vd];
+
         [sys->glESView 
performSelectorOnMainThread:@selector(fetchViewContainer) withObject:nil 
waitUntilDone:YES];
         if (!sys->viewContainer) {
             msg_Err(vd, "Fetching view container failed");

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to