[Crash] Add Checks for valid pointers or fix existing. (#3164)

This commit is contained in:
Aeadoin
2023-04-01 12:44:00 -04:00
committed by GitHub
parent 4c2271ff69
commit 0d509a7f3a
19 changed files with 228 additions and 179 deletions
+1 -1
View File
@@ -445,7 +445,7 @@ Pet::Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 po
GiveNPCTypeData(type_data);
typeofpet = type;
petpower = power;
SetOwnerID(owner->GetID());
SetOwnerID(owner ? owner->GetID() : 0);
SetPetSpellID(spell_id);
// All pets start at false on newer clients. The client