1
0
Fork 0
mirror of https://github.com/hyprwm/wlroots-hyprland.git synced 2025-04-15 06:58:02 +02:00

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
This commit is contained in:
Simon Ser 2021-04-21 08:32:18 +02:00
parent 8e375ae340
commit 6622cd3277

View file

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