mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
[Crash] Pointer validation in mob iteration loops (#2490)
This commit is contained in:
+6
-1
@@ -1724,6 +1724,9 @@ void EntityList::QueueCloseClients(
|
||||
|
||||
for (auto &e : GetCloseMobList(sender, distance)) {
|
||||
Mob *mob = e.second;
|
||||
if (!mob) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!mob->IsClient()) {
|
||||
continue;
|
||||
@@ -4416,6 +4419,9 @@ void EntityList::QuestJournalledSayClose(
|
||||
if (RuleB(Chat, QuestDialogueUsesDialogueWindow)) {
|
||||
for (auto &e : GetCloseMobList(sender, (dist * dist))) {
|
||||
Mob *mob = e.second;
|
||||
if (!mob) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!mob->IsClient()) {
|
||||
continue;
|
||||
@@ -5551,7 +5557,6 @@ std::vector<Mob*> EntityList::GetTargetsForVirusEffect(Mob *spreader, Mob *origi
|
||||
bool is_detrimental_spell = IsDetrimentalSpell(spell_id);
|
||||
for (auto &it : entity_list.GetCloseMobList(spreader, range)) {
|
||||
Mob *mob = it.second;
|
||||
|
||||
if (!mob) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user