diff options
author | Aman Gupta <aman@tmm1.net> | 2018-04-16 14:29:26 -0700 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-04-17 01:06:29 +0300 |
commit | ed7bc3a5f3cce63a44e11e5fa57526309235411c (patch) | |
tree | f92ebef71fece2f5c0706389226a862c9cfb66eb /video/out/opengl | |
parent | 8f1c40f702614b14cd13f62f1b34d82ce2d5c949 (diff) | |
download | mpv-ed7bc3a5f3cce63a44e11e5fa57526309235411c.tar.bz2 mpv-ed7bc3a5f3cce63a44e11e5fa57526309235411c.tar.xz |
hwdec_ios: fix crash after mapper_init failure
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/hwdec_ios.m | 6 |
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 = { |