Possibly fixed more memory leaks in other places.

--HG--
branch : trunk
This commit is contained in:
raczman committed 2009-05-13 14:06:33 +02:00
1 parent 5748c36621
commit bfaaa8201e
6 files changed
+20 -3

No files matched your search

+4
View File
@@ -3827,6 +3827,9 @@ bool ChatHandler::HandleCreatePetCommand(const char* args)
// Everything looks OK, create new pet
Pet* pet = new Pet(HUNTER_PET);
if(!pet)
return false;
if(!pet->CreateBaseAtCreature(creatureTarget))
{
delete pet;
@@ -3846,6 +3849,7 @@ bool ChatHandler::HandleCreatePetCommand(const char* args)
{
sLog.outError("ERROR: InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
PSendSysMessage("Error 2");
delete pet;
return false;
}