From 6622cd327739424bdb56822f27831b68edbc32ef Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 21 Apr 2021 08:32:18 +0200 Subject: output: correctly handle outputs without a test() impl This fixes a crash when calling wlr_output_test() on a headless output. Closes: https://github.com/swaywm/sway/issues/6213 --- types/wlr_output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/wlr_output.c b/types/wlr_output.c index d07bc405..8f83a005 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -580,6 +580,9 @@ bool wlr_output_test(struct wlr_output *output) { if (!output_basic_test(output)) { return false; } + if (!output->impl->test) { + return true; + } return output->impl->test(output); } -- cgit v1.2.3