[vlc-devel] [PATCH 2/2] iOS: check objC-isness before retaining the UIView
Jean-Baptiste Kempf
jb at videolan.org
Wed Sep 6 01:08:30 CEST 2017
---
modules/video_output/ios.m | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index dd590b97eb..a22d281b4d 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -483,14 +483,14 @@ static void OpenglESSwap(vlc_gl_t *gl)
return;
}
+ if (unlikely(![viewContainer respondsToSelector:@selector(isKindOfClass:)])) {
+ msg_Err(_voutDisplay, "void pointer not an ObjC object");
+ return;
+ }
+
[viewContainer retain];
@synchronized(viewContainer) {
- if (unlikely(![viewContainer respondsToSelector:@selector(isKindOfClass:)])) {
- msg_Err(_voutDisplay, "void pointer not an ObjC object");
- return;
- }
-
if (![viewContainer isKindOfClass:[UIView class]]) {
msg_Err(_voutDisplay, "passed ObjC object not of class UIView");
return;
--
2.14.1
More information about the vlc-devel
mailing list