aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-02-04 22:37:16 +0100
committerShauren <shauren.trinity@gmail.com>2019-07-21 21:06:54 +0200
commitad008c43b75080ec59aa973f1e2e4424332c34a4 (patch)
treef5b7e98e0fc47a25246ce999e15d6f413b8018ab /src/server/scripts/EasternKingdoms
parent92e95ddf558db5fdcdf3c54ecd1d694da92c3a44 (diff)
Core/Misc: Fix various crashes, also related to multithreading (#19012)
* When iterating groups we have to either do it not in multithreaded context (map updates) or start with checking maps (they are guaranteed to change in single thread update). * Properly clear ComboPoint references on player remove * remove some possible references item may have when it is deleted during save. * Also clear all hostile references when unit is removed from map. (cherrypicked from 86da1a19bb36edf3242dafac6e45e87434ddff73)
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index a48587849b5..3fae22e8e50 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -65,7 +65,7 @@ public:
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* pGroupie = itr->GetSource();
- if (!pGroupie)
+ if (!pGroupie || !pGroupie->IsInMap(player))
continue;
if (pGroupie->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE &&