summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2018-04-16 14:29:26 -0700
committerJan Ekström <jeebjp@gmail.com>2018-04-17 01:06:29 +0300
commited7bc3a5f3cce63a44e11e5fa57526309235411c (patch)
treef92ebef71fece2f5c0706389226a862c9cfb66eb
parent8f1c40f702614b14cd13f62f1b34d82ce2d5c949 (diff)
downloadmpv-ed7bc3a5f3cce63a44e11e5fa57526309235411c.tar.bz2
mpv-ed7bc3a5f3cce63a44e11e5fa57526309235411c.tar.xz
hwdec_ios: fix crash after mapper_init failure
-rw-r--r--video/out/opengl/hwdec_ios.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/opengl/hwdec_ios.m b/video/out/opengl/hwdec_ios.m
index b8d4876c80..a16a09fb71 100644
--- a/video/out/opengl/hwdec_ios.m
+++ b/video/out/opengl/hwdec_ios.m
@@ -253,8 +253,10 @@ static void mapper_uninit(struct ra_hwdec_mapper *mapper)
struct priv *p = mapper->priv;
CVPixelBufferRelease(p->pbuf);
- CFRelease(p->gl_texture_cache);
- p->gl_texture_cache = NULL;
+ if (p->gl_texture_cache) {
+ CFRelease(p->gl_texture_cache);
+ p->gl_texture_cache = NULL;
+ }
}
const struct ra_hwdec_driver ra_hwdec_videotoolbox = {