[Crash Fix] Pet initialization

This commit is contained in:
Yunfan Li
2024-05-28 18:27:51 +08:00
parent 4b9af119c4
commit 00b6426c8f

View File

@@ -583,7 +583,7 @@ void PlayerbotFactory::InitPetTalents()
return;
}
CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family);
if (pet_family->petTalentType < 0) {
if (!pet_family || pet_family->petTalentType < 0) {
// LOG_INFO("playerbots", "{} init pet talents failed with petTalentType < 0({})", bot->GetName().c_str(), pet_family->petTalentType);
return;
}