diff options
author | Simon Ser <contact@emersion.fr> | 2022-01-12 18:37:21 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-11-15 15:50:19 +0000 |
commit | 48541d2f2e19e8b126bb54269744962c119da209 (patch) | |
tree | 53c1e30f6fbb20207674dd6abee7bf185585982e | |
parent | 45159f8708a470cb67281288ca32468fee47cea6 (diff) |
scene: check wlr_renderer_begin return value
-rw-r--r-- | types/scene/wlr_scene.c | 6 |
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); |