Core/SmartScript: Fixed possible crashes when attempting to use StoreTargetList with a the same list already stored on the same id
This commit is contained in:
1 parent
eff48a42d1
commit
90cacb9ab9
1 file changed
+6
@@ -98,7 +98,13 @@ class SmartScript
|
||||
return;
|
||||
|
||||
if (mTargetStorage->find(id) != mTargetStorage->end())
|
||||
{
|
||||
// check if already stored
|
||||
if ((*mTargetStorage)[id] == targets)
|
||||
return;
|
||||
|
||||
delete (*mTargetStorage)[id];
|
||||
}
|
||||
|
||||
(*mTargetStorage)[id] = targets;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user