[7259] Prevent memory lost at pet spell reset.

This commit is contained in:
VladimirMangos 2009-02-10 06:01:37 +03:00
parent fb6fe325bf
commit 63b8d1f537
2 changed files with 4 additions and 1 deletions

View file

@ -1440,7 +1440,10 @@ void Pet::InitPetCreateSpells()
{
m_charmInfo->InitPetActionBar();
for (PetSpellMap::iterator i = m_spells.begin(); i != m_spells.end(); ++i)
delete i->second;
m_spells.clear();
uint32 petspellid;
PetCreateSpellEntry const* CreateSpells = objmgr.GetPetCreateSpellEntry(GetEntry());
if(CreateSpells)