From 83ed661ba65fc99139dc28a4e7d08c4a0302d96d Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Sun, 31 May 2026 18:42:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(policy):=20=E7=A7=BB=E5=8A=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=89=80=E5=9C=A8=20workspace=20=E5=89=8D=E5=85=88?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E7=9B=AE=E6=A0=87=20workspace=20=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/policy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/policy.c b/src/core/policy.c index a10675d..7e3bed5 100644 --- a/src/core/policy.c +++ b/src/core/policy.c @@ -330,11 +330,12 @@ static void send_window_to_workspace_same_output_by_index( const zdwm_action_data_window_send_to_workspace_t *data, command_buffer_t *command_buffer ) { + auto target_workspace = state_workspace_at(state, (size_t)data->index); + if (!target_workspace) return; + auto output = state_output_at(state, state->current_output_index); auto current_workspace = state_workspace_get(state, output->current_workspace_id); - - auto target_workspace = state_workspace_at(state, (size_t)data->index); if (current_workspace->id == target_workspace->id) return; if (data->switch_workspace) {