From 00b6426c8fb9255e44df800d3e991aac458d0fb5 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 28 May 2024 18:27:51 +0800 Subject: [PATCH] [Crash Fix] Pet initialization --- src/PlayerbotFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index fe6b45eb..5a084cf8 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -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; }