aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-05-18 01:26:30 -0400
committerSimon Ser <contact@emersion.fr>2023-05-18 07:05:30 +0000
commitc4bed48fcc021d5a68ad32af16ff8ac3cee71c57 (patch)
tree3cecc8bcad57591f515fbcf620ac017ee9aeb2f1
parent75293d5fb02f7a968a8409741553d958f015458a (diff)
output_pick_format: Fail if no format could be chosen
-rw-r--r--types/output/render.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/types/output/render.c b/types/output/render.c
index 035be212..6e284883 100644
--- a/types/output/render.c
+++ b/types/output/render.c
@@ -220,6 +220,12 @@ bool output_pick_format(struct wlr_output *output,
}
}
+ if (format->len == 0) {
+ wlr_drm_format_finish(format);
+ wlr_log(WLR_DEBUG, "Failed to pick output format");
+ return false;
+ }
+
return true;
}