fix(Core/Minions): Crashfix. (#11592)

This commit is contained in:
UltraNix
2022-05-01 10:28:20 +02:00
committed by GitHub
parent 1a6ed13dac
commit 8900cab657

View File

@@ -334,11 +334,12 @@ void Minion::InitStats(uint32 duration)
SetReactState(REACT_PASSIVE);
Unit* owner = GetOwner();
SetCreatorGUID(owner->GetGUID());
SetFaction(owner->GetFaction());
owner->SetMinion(this, true);
if (Unit* owner = GetOwner())
{
SetCreatorGUID(owner->GetGUID());
SetFaction(owner->GetFaction());
owner->SetMinion(this, true);
}
}
void Minion::RemoveFromWorld()