aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-01-12 18:37:21 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-11-15 15:50:19 +0000
commit48541d2f2e19e8b126bb54269744962c119da209 (patch)
tree53c1e30f6fbb20207674dd6abee7bf185585982e
parent45159f8708a470cb67281288ca32468fee47cea6 (diff)
scene: check wlr_renderer_begin return value
-rw-r--r--types/scene/wlr_scene.c6
1 files changed, 5 insertions, 1 deletions
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);