From c4bed48fcc021d5a68ad32af16ff8ac3cee71c57 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Thu, 18 May 2023 01:26:30 -0400 Subject: [PATCH] output_pick_format: Fail if no format could be chosen --- types/output/render.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; }