vo/opengl/context_win: fix crash on init failure

Don't try to access window context if it failed to create.
This commit is contained in:
Kacper Michajłow 2024-07-06 19:43:47 +02:00
parent 9158653982
commit d448598588
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ static bool wgl_init(struct ra_ctx *ctx)
p->opts = p->opts_cache->opts;
if (!vo_w32_init(ctx->vo))
goto fail;
return false;
if (ctx->opts.want_alpha)
vo_w32_set_transparency(ctx->vo, ctx->opts.want_alpha);