mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 05:01:29 +00:00
I keep seeing a crash due to an invalidated iter during mob delete every few days, seeing if this fixes it.
This commit is contained in:
parent
7feb531ff7
commit
ec8c46abfe
@ -497,7 +497,6 @@ void EntityList::MobProcess()
|
|||||||
if (!it->second->Process()) {
|
if (!it->second->Process()) {
|
||||||
Mob *mob = it->second;
|
Mob *mob = it->second;
|
||||||
uint16 tempid = it->first;
|
uint16 tempid = it->first;
|
||||||
++it; // we don't erase here because the destructor will
|
|
||||||
if (mob->IsNPC()) {
|
if (mob->IsNPC()) {
|
||||||
entity_list.RemoveNPC(mob->CastToNPC()->GetID());
|
entity_list.RemoveNPC(mob->CastToNPC()->GetID());
|
||||||
} else if (mob->IsMerc()) {
|
} else if (mob->IsMerc()) {
|
||||||
@ -525,7 +524,12 @@ void EntityList::MobProcess()
|
|||||||
}
|
}
|
||||||
entity_list.RemoveClient(mob->GetID());
|
entity_list.RemoveClient(mob->GetID());
|
||||||
}
|
}
|
||||||
entity_list.RemoveMob(tempid);
|
|
||||||
|
if(entity_list.RemoveMob(tempid)) {
|
||||||
|
it = mob_list.begin();
|
||||||
|
} else {
|
||||||
|
++it;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user