Skip to content

Commit

Permalink
vo_opengl: glctx can be NULL during init
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wm4 committed Jul 21, 2016
1 parent 16d2763 commit 99d9921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion video/out/vo_opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 99d9921

Please sign in to comment.