From 99d9921f39706b90b00d5b97d07ed12c60ea5786 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 21 Jul 2016 16:07:15 +0200 Subject: vo_opengl: glctx can be NULL during init This fixes a crash that can happen with the Cocoa backend: it calls vo_wakeup() during init, which calls vo_opengl.c/wakeup(). Fixes #3360. --- video/out/vo_opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 8c8da4affd..8a7c797ea8 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -360,7 +360,7 @@ static int control(struct vo *vo, uint32_t request, void *data) static void wakeup(struct vo *vo) { struct gl_priv *p = vo->priv; - if (p->glctx->driver->wakeup) + if (p->glctx && p->glctx->driver->wakeup) p->glctx->driver->wakeup(p->glctx); } -- cgit v1.2.3