Skip to content

Commit 99d9921

Browse files
author
wm4
committed
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.
1 parent 16d2763 commit 99d9921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

video/out/vo_opengl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static int control(struct vo *vo, uint32_t request, void *data)
360360
static void wakeup(struct vo *vo)
361361
{
362362
struct gl_priv *p = vo->priv;
363-
if (p->glctx->driver->wakeup)
363+
if (p->glctx && p->glctx->driver->wakeup)
364364
p->glctx->driver->wakeup(p->glctx);
365365
}
366366

0 commit comments

Comments
 (0)