summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_abstractlist.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ai/api/ai_abstractlist.cpp b/src/ai/api/ai_abstractlist.cpp
index d18010a10..ec2b7d4f5 100644
--- a/src/ai/api/ai_abstractlist.cpp
+++ b/src/ai/api/ai_abstractlist.cpp
@@ -476,6 +476,7 @@ bool AIAbstractList::SetValue(int32 item, int32 value)
if (!this->HasItem(item)) return false;
int32 value_old = this->GetValue(item);
+ if (value_old == value) return true;
this->sorter->Remove(item);
this->buckets[value_old].erase(item);