From dc587839da6078b9aaf01cd9e832ec66def58430 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Wed, 21 Apr 2021 01:14:34 +0200 Subject: [PATCH] Tolerate ending unstarted action selection. Relax the assertion in action_selection_no_longer_in_progress() so it allows ending the action selection for a unit that never started it. This may happen when a follow up question to the action selection dialog is asked from a non action selection dialog source like a menu item for that action alone. See osdn #42042 --- client/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/control.c b/client/control.c index 0c20fe06c3..38e0a24327 100644 --- a/client/control.c +++ b/client/control.c @@ -1033,7 +1033,8 @@ void action_selection_no_longer_in_progress(const int old_actor_id) /* IDENTITY_NUMBER_ZERO is accepted for cases where the unit is gone * without a trace. */ fc_assert_msg(old_actor_id == action_selection_in_progress_for - || old_actor_id == IDENTITY_NUMBER_ZERO, + || old_actor_id == IDENTITY_NUMBER_ZERO + || action_selection_in_progress_for == IDENTITY_NUMBER_ZERO, "Decision taken for %d but selection is for %d.", old_actor_id, action_selection_in_progress_for); -- 2.30.2