aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-01-12 18:37:09 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-11-15 15:50:19 +0000
commit45159f8708a470cb67281288ca32468fee47cea6 (patch)
treeb97ec37cdf9c98c75a507d480b912c23f6fa6bac
parenta541c9510a4cf544313bc9b0503d75820b42444e (diff)
output: check wlr_renderer_begin return value
-rw-r--r--types/output/render.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/types/output/render.c b/types/output/render.c
index 13d714e1..b0322578 100644
--- a/types/output/render.c
+++ b/types/output/render.c
@@ -157,7 +157,9 @@ static bool output_attach_empty_back_buffer(struct wlr_output *output,
output_pending_resolution(output, state, &width, &height);
struct wlr_renderer *renderer = output->renderer;
- wlr_renderer_begin(renderer, width, height);
+ if (!wlr_renderer_begin(renderer, width, height)) {
+ return false;
+ }
wlr_renderer_clear(renderer, (float[]){0, 0, 0, 0});
wlr_renderer_end(renderer);