Skip to content

Commit

Permalink
[11492] Fix possible crash at guardian pet unsummon
Browse files Browse the repository at this point in the history
  • Loading branch information
zergtmn committed May 15, 2011
1 parent 3489554 commit 708ed71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/game/Unit.cpp
Expand Up @@ -5962,10 +5962,12 @@ void Unit::RemoveGuardians()
{
while (!m_guardianPets.empty())
{
if (Pet* pet = GetMap()->GetPet(*m_guardianPets.begin()))
ObjectGuid guid = *m_guardianPets.begin();

if (Pet* pet = GetMap()->GetPet(guid))
pet->Unsummon(PET_SAVE_AS_DELETED, this);

m_guardianPets.erase(m_guardianPets.begin());
m_guardianPets.erase(guid);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11491"
#define REVISION_NR "11492"
#endif // __REVISION_NR_H__

0 comments on commit 708ed71

Please sign in to comment.