Some quick additions of sanity checks for pointers and variables

This commit is contained in:
Noudess
2019-11-07 09:31:50 -05:00
parent a7bcc12eb6
commit f012d13f0c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -109,7 +109,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
glm::vec2(8, 8), glm::vec2(-8, 8), glm::vec2(8, -8), glm::vec2(-8, -8)
};
NPC* swarm_pet_npc;
NPC* swarm_pet_npc = nullptr;
while (summon_count > 0) {
int pet_duration = pet.duration;
@@ -164,7 +164,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
summon_count--;
}
if (IsClient() && eye_id != nullptr) {
if (swarm_pet_npc && IsClient() && eye_id != nullptr) {
*eye_id = swarm_pet_npc->GetID();
}