fix(Core): Crash on smart event: near players (#12479)
This commit is contained in:
parent
f0777d1fd3
commit
5b0896577f
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue