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
master
Simon Ser 4 years ago
parent 8e375ae340
commit 6622cd3277

@ -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);
}

Loading…
Cancel
Save