mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 09:29:29 +00:00
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:
parent
16d276308a
commit
99d9921f39
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user