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.
This commit is contained in:
Kenny Levinsen 2024-11-11 12:47:52 +01:00 committed by Simon Ser
parent f23d100747
commit 463c4c9369

View File

@ -282,6 +282,7 @@ static int output_repaint_timer_handler(void *data) {
struct wlr_output_state pending; struct wlr_output_state pending;
wlr_output_state_init(&pending); wlr_output_state_init(&pending);
if (!wlr_scene_output_build_state(output->scene_output, &pending, &opts)) { if (!wlr_scene_output_build_state(output->scene_output, &pending, &opts)) {
wlr_output_state_finish(&pending);
return 0; return 0;
} }