vo_gpu: fix segfault when updating render opts

VOCTRL_UPDATE_RENDER_OPTS is supposed to be optional so check if it
actually exists before executing the function. Fixes a segfault when
changing the alpha value at runtime on non-wayland platforms.
This commit is contained in:
Dudemanguy 2020-10-15 12:18:59 -05:00
parent f5a094db04
commit f781c00ece
1 changed files with 2 additions and 1 deletions

View File

@ -207,7 +207,8 @@ static int control(struct vo *vo, uint32_t request, void *data)
update_ra_ctx_options(vo); update_ra_ctx_options(vo);
gl_video_configure_queue(p->renderer, vo); gl_video_configure_queue(p->renderer, vo);
get_and_update_icc_profile(p); get_and_update_icc_profile(p);
p->ctx->fns->update_render_opts(p->ctx); if (p->ctx->fns->update_render_opts)
p->ctx->fns->update_render_opts(p->ctx);
vo->want_redraw = true; vo->want_redraw = true;
return true; return true;
} }