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

Thomas Guillem git at videolan.org
Wed Mar 7 15:47:18 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at 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 <thomas at 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");



More information about the vlc-commits mailing list