From f781c00ece48ac8b5d0ce1429e08d10365dfa932 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Thu, 15 Oct 2020 12:18:59 -0500 Subject: 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. --- video/out/vo_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c index f7c29ceacb..5d28a30054 100644 --- a/video/out/vo_gpu.c +++ b/video/out/vo_gpu.c @@ -207,7 +207,8 @@ static int control(struct vo *vo, uint32_t request, void *data) update_ra_ctx_options(vo); gl_video_configure_queue(p->renderer, vo); 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; return true; } -- cgit v1.2.3