aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);