diff options
author | Simon Ser <contact@emersion.fr> | 2022-10-10 12:08:06 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-10-10 12:08:06 +0200 |
commit | 650f955507a95c5af2fda1628eafc28ef6d99543 (patch) | |
tree | 99e4a83f1ff0d58bb5fc1c5194dcd9e67e3678cf | |
parent | 99f55303aaac1f7f3e73041561d292e81c4eb95e (diff) |
output: fix crash in output_test_with_back_buffer()
The output->impl->test check has been removed, but
output_test_with_back_buffer() hasn't been updated accordingly.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3506
Fixes: 3be6658ee7b6 ("output: allocate swapchain on first commit")
-rw-r--r-- | types/output/render.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/types/output/render.c b/types/output/render.c index 50fbfa2b..13d714e1 100644 --- a/types/output/render.c +++ b/types/output/render.c @@ -166,7 +166,9 @@ static bool output_attach_empty_back_buffer(struct wlr_output *output, static bool output_test_with_back_buffer(struct wlr_output *output, const struct wlr_output_state *state) { - assert(output->impl->test != NULL); + if (output->impl->test == NULL) { + return true; + } // Create a shallow copy of the state with the empty back buffer included // to pass to the backend. |