Crashfix: GetInstanceScript() if target is NULL in achievement_defenseless
This commit is contained in:
@@ -168,6 +168,9 @@ class achievement_defenseless : public AchievementCriteriaScript
|
|||||||
|
|
||||||
bool OnCheck(Player* /*player*/, Unit* target)
|
bool OnCheck(Player* /*player*/, Unit* target)
|
||||||
{
|
{
|
||||||
|
if(!target)
|
||||||
|
return false;
|
||||||
|
|
||||||
InstanceScript* instance = target->GetInstanceScript();
|
InstanceScript* instance = target->GetInstanceScript();
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user