From da1f28f3dd2da1e8e61c8da5c581c270af32eae3 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sat, 23 Nov 2024 11:10:41 -0500 Subject: [PATCH] output: fix assert() fail when enabling an output that was disabled When the output is in the process of being enabled, but the new state has not been committed yet, wlr_output->enabled is still false. So it's not safe to assert that it's true in output_enable_adaptive_sync(). Fixes: 36e099fc93b3caf87e7f390a732fcec69373de8c "view: ensure output is usable before setting adaptive sync" --- src/output.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/output.c b/src/output.c index 0ab1d28d..e217a8a3 100644 --- a/src/output.c +++ b/src/output.c @@ -1048,8 +1048,6 @@ handle_output_power_manager_set_mode(struct wl_listener *listener, void *data) void output_enable_adaptive_sync(struct output *output, bool enabled) { - assert(output_is_usable(output)); - wlr_output_state_set_adaptive_sync_enabled(&output->pending, enabled); if (!wlr_output_test_state(output->wlr_output, &output->pending)) { wlr_output_state_set_adaptive_sync_enabled(&output->pending, false);