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.
This commit is contained in:
wm4 2016-07-21 16:07:15 +02:00
parent 16d276308a
commit 99d9921f39
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}