Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
output: correctly handle outputs without a test() impl
Browse files Browse the repository at this point in the history
This fixes a crash when calling wlr_output_test() on a headless
output.

Closes: swaywm/sway#6213
  • Loading branch information
emersion committed Apr 21, 2021
1 parent 8e375ae commit 6622cd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/wlr_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 6622cd3

Please sign in to comment.