From 48541d2f2e19e8b126bb54269744962c119da209 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 12 Jan 2022 18:37:21 +0100 Subject: [PATCH] scene: check wlr_renderer_begin return value --- types/scene/wlr_scene.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 1f0d64aa..e9857dc3 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -1538,7 +1538,11 @@ bool wlr_scene_output_commit(struct wlr_scene_output *scene_output) { return true; } - wlr_renderer_begin(renderer, output->width, output->height); + if (!wlr_renderer_begin(renderer, output->width, output->height)) { + pixman_region32_fini(&damage); + wlr_output_rollback(output); + return false; + } pixman_region32_t background; pixman_region32_init(&background);