Skip to content

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 authored and g7 committed Aug 24, 2021
1 parent c4c19f2 commit b76f7b9
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 @@ -571,6 +571,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 b76f7b9

Please sign in to comment.