* Add NULL-pointer check to CharmInfo destructor. Closes issue #3287.

* Remove references to AuctionHouseBot files from win project.

--HG--
branch : trunk
This commit is contained in:
azazel
2010-08-06 12:28:37 +06:00
parent 1565fe4ff4
commit 4fb3098d18
4 changed files with 11 additions and 24 deletions
+1 -1
View File
@@ -16935,7 +16935,7 @@ void Player::LoadPet()
if (IsInWorld())
{
Pet *pet = new Pet(this);
if (!pet->LoadPetFromDB(this,0,0,true))
if (!pet->LoadPetFromDB(this, 0, 0, true))
delete pet;
}
}
+2 -3
View File
@@ -13491,9 +13491,8 @@ CharmInfo::CharmInfo(Unit* unit)
CharmInfo::~CharmInfo()
{
if (m_unit->GetTypeId() == TYPEID_UNIT)
{
m_unit->ToCreature()->SetReactState(m_oldReactState);
}
if (Creature *pCreature = m_unit->ToCreature())
pCreature->SetReactState(m_oldReactState);
}
void CharmInfo::InitPetActionBar()