[vlc-commits] vout: ios: fix call order

Thomas Guillem git at videolan.org
Mon Mar 5 17:18:33 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Mar  5 15:31:55 2018 +0100| [960c66f6ae7f47bc179f297537e2d32d84ab53f3] | committer: Thomas Guillem

vout: ios: fix call order

Check nullity before using the glESView object.

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

 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");



More information about the vlc-commits mailing list