mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
fix(Core): Crash on smart event: near players (#12479)
This commit is contained in:
@@ -3945,7 +3945,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
|
||||
if (!units.empty())
|
||||
{
|
||||
if (unit->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!unit || unit->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (units.size() >= e.event.nearPlayer.minCount)
|
||||
@@ -3961,7 +3961,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
|
||||
if (!units.empty())
|
||||
{
|
||||
if (unit->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!unit || unit->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (units.size() < e.event.nearPlayerNegation.minCount)
|
||||
|
||||
Reference in New Issue
Block a user