From 86da1a19bb36edf3242dafac6e45e87434ddff73 Mon Sep 17 00:00:00 2001 From: xinef1 Date: Sat, 4 Feb 2017 22:37:16 +0100 Subject: 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. --- src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/scripts/EasternKingdoms') diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 03dd3986a4a..3ccf0e3dd19 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -61,7 +61,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 && -- cgit v1.2.3