diff options
author | Simon Ser <contact@emersion.fr> | 2021-04-21 08:32:18 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-21 08:52:50 +0200 |
commit | 6622cd327739424bdb56822f27831b68edbc32ef (patch) | |
tree | 754c9b55269adbb6ed12c11fd6abe08a11bb85f2 | |
parent | 8e375ae3404cdb665cb3f42ca8a1f6bc99c66002 (diff) |
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
-rw-r--r-- | types/wlr_output.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |