mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
[Bug Fix] Fix possible crash with #killallnpcs. (#1846)
This commit is contained in:
parent
4507b063f5
commit
298ae3e3ba
@ -11,6 +11,10 @@ void command_killallnpcs(Client *c, const Seperator *sep)
|
|||||||
for (auto& npc_entity : entity_list.GetNPCList()) {
|
for (auto& npc_entity : entity_list.GetNPCList()) {
|
||||||
auto entity_id = npc_entity.first;
|
auto entity_id = npc_entity.first;
|
||||||
auto npc = npc_entity.second;
|
auto npc = npc_entity.second;
|
||||||
|
if (!npc) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
std::string entity_name = str_tolower(npc->GetName());
|
std::string entity_name = str_tolower(npc->GetName());
|
||||||
if (
|
if (
|
||||||
(
|
(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user