summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/gl_video.c3
-rw-r--r--video/out/vo_opengl.c9
2 files changed, 6 insertions, 6 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index d2d0c2e571..07ba0bd602 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -2197,6 +2197,9 @@ static int init_gl(struct gl_video *p)
void gl_video_uninit(struct gl_video *p)
{
+ if (!p)
+ return;
+
GL *gl = p->gl;
uninit_video(p);
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 7993b0a3e7..2043a4cd3c 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -392,12 +392,9 @@ static void uninit(struct vo *vo)
{
struct gl_priv *p = vo->priv;
- if (p->glctx) {
- if (p->renderer)
- gl_video_uninit(p->renderer);
- gl_hwdec_uninit(p->hwdec);
- mpgl_uninit(p->glctx);
- }
+ gl_video_uninit(p->renderer);
+ gl_hwdec_uninit(p->hwdec);
+ mpgl_uninit(p->glctx);
}
static int preinit(struct vo *vo)