summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec_ios.m
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/hwdec_ios.m')
-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 = {