From 463c4c9369dc551c51c0888b411d49f8d9660a85 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Mon, 11 Nov 2024 12:47:52 +0100 Subject: [PATCH] desktop/output: Clean up output state if build_state fails wlr_scene_output_build_state can fail for various reasons. Ensure that the pending output state is cleaned up in that case. --- sway/desktop/output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 064b5449b..9b98e29a4 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -282,6 +282,7 @@ static int output_repaint_timer_handler(void *data) { struct wlr_output_state pending; wlr_output_state_init(&pending); if (!wlr_scene_output_build_state(output->scene_output, &pending, &opts)) { + wlr_output_state_finish(&pending); return 0; }