mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Core/Pets: Add missing nullptr check
(cherry picked from commit 0152878de5)
This commit is contained in:
@@ -21963,7 +21963,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
|
||||
|
||||
if (!pet)
|
||||
{
|
||||
if (mode == PET_SAVE_NOT_IN_SLOT && m_petStable->CurrentPet)
|
||||
if (mode == PET_SAVE_NOT_IN_SLOT && m_petStable && m_petStable->CurrentPet)
|
||||
{
|
||||
// Handle removing pet while it is in "temporarily unsummoned" state, for example on mount
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_PET_SLOT_BY_ID);
|
||||
|
||||
Reference in New Issue
Block a user