vlc/vlc-3.0 | branch: master | Thomas Guillem <tho...@gllm.fr> | Wed Mar  7 
08:56:57 2018 +0100| [631a67502bedfda03dc0fdd31829bc79f4e675c4] | committer: 
Thomas Guillem

vout: ios: call ReleaseCurrent only if needed when closing

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

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

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

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 28f259ed8b..d024305f20 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -239,9 +239,10 @@ static void Close (vlc_object_t *this)
 
             if (likely(glsys->vgl))
             {
-                vlc_gl_MakeCurrent(sys->gl);
+                int ret = vlc_gl_MakeCurrent(sys->gl);
                 vout_display_opengl_Delete(glsys->vgl);
-                vlc_gl_ReleaseCurrent(sys->gl);
+                if (ret == VLC_SUCCESS)
+                    vlc_gl_ReleaseCurrent(sys->gl);
             }
             vlc_object_release(sys->gl);
         }

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

Reply via email to