[vlc-devel] [PATCH 3/4] vout/ios: Remove unnecessary nil check

Marvin Scholz epirat07 at gmail.com
Fri Jan 18 18:52:39 CET 2019


Sending a message to nil is valid, which makes this check
unnecessary.
---
 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 77089e580d7..51a9170fb8d 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -402,8 +402,7 @@ - (id)initWithFrame:(CGRect)frame andVD:(vout_display_t*)vd
     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];
-- 
2.17.2 (Apple Git-113)



More information about the vlc-devel mailing list