aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-10 09:57:25 -0600
committermegamage <none@none>2009-02-10 09:57:25 -0600
commit22855d6e79e5a7007845b5d6a452aa94cc020b9c (patch)
tree35d0142947b273a6d505b4b1947c3cd9b8272fe1
parent3a129a443c154e301bc8140271af50dbfa4448cf (diff)
[7259] Prevent memory lost at pet spell reset. Author: VladimirMangos
--HG-- branch : trunk
-rw-r--r--src/game/Pet.cpp3
-rw-r--r--src/shared/revision_nr.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 1205ed641f0..bf150ec3a42 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1475,7 +1475,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)
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index 7e520b37f57..a8fa063666f 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "7258"
+ #define REVISION_NR "7259"
#endif // __REVISION_NR_H__