mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 17:43:47 +00:00
fix(Core/Pet): Fix possible crash when using dangling pointer as pets spell target and fix possible memory leak. (#21420)
This commit is contained in:
committed by
GitHub
parent
47c524581b
commit
fe2627bc91
@@ -441,7 +441,10 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
bool haspositiveeffect = false;
|
||||
|
||||
if (!unit_target)
|
||||
{
|
||||
delete spell;
|
||||
return;
|
||||
}
|
||||
|
||||
// search positive effects for spell
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
|
||||
Reference in New Issue
Block a user