aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2022-10-07 18:05:36 +0300
committerSimon Ser <contact@emersion.fr>2022-10-07 15:12:53 +0000
commitff9c52801f26eb85d2a51f12ad6d2819f97a66e6 (patch)
tree7ff2e6bf12029b9530aec2e30c468e6faea41597
parent46a686ce6b02724f42b8d9ab8b7aeed958d4c7f6 (diff)
output: add a swapchain NULL check in wlr_output_commit_state()
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3504
-rw-r--r--types/output/output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/types/output/output.c b/types/output/output.c
index 51a316c2..04361231 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -817,7 +817,8 @@ bool wlr_output_commit_state(struct wlr_output *output,
output->needs_frame = false;
}
- if (pending.committed & WLR_OUTPUT_STATE_BUFFER) {
+ if ((pending.committed & WLR_OUTPUT_STATE_BUFFER) &&
+ output->swapchain != NULL) {
wlr_swapchain_set_buffer_submitted(output->swapchain, pending.buffer);
}