[vlc-commits] vout/ios: Remove unnecessary nil check

Marvin Scholz git at videolan.org
Mon Jan 21 14:31:54 CET 2019


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Jan 18 18:52:39 2019 +0100| [405780b018ef941dba9b3d3bf17d6852e40ca8e4] | committer: Thomas Guillem

vout/ios: Remove unnecessary nil check

Sending a message to nil is valid, which makes this check
unnecessary.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

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

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 77089e580d..51a9170fb8 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -402,8 +402,7 @@ static void GLESSwap(vlc_gl_t *gl)
     if (unlikely(!_eaglContext)
      || unlikely(![EAGLContext setCurrentContext:_eaglContext]))
     {
-        if (_eaglContext)
-            [_eaglContext release];
+        [_eaglContext release];
         vlc_mutex_destroy(&_mutex);
         vlc_cond_destroy(&_gl_attached_wait);
         [super dealloc];



More information about the vlc-commits mailing list