From bfaaa8201e6887fedd2145d668f40a484a609dac Mon Sep 17 00:00:00 2001 From: raczman Date: Wed, 13 May 2009 14:06:33 +0200 Subject: Possibly fixed more memory leaks in other places. --HG-- branch : trunk --- src/game/OutdoorPvPSI.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/game/OutdoorPvPSI.cpp') diff --git a/src/game/OutdoorPvPSI.cpp b/src/game/OutdoorPvPSI.cpp index 378543da48e..e4686573a67 100644 --- a/src/game/OutdoorPvPSI.cpp +++ b/src/game/OutdoorPvPSI.cpp @@ -200,8 +200,13 @@ bool OutdoorPvPSI::HandleDropFlag(Player *plr, uint32 spellId) // he dropped it further, summon mound GameObject * go = new GameObject; Map * map = MapManager::Instance().GetMap(plr->GetMapId(), plr); - if(!map) - return true; + if(!map){ + + delete go; + return true; + + } + if(!go->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT),SI_SILITHYST_MOUND, map,plr->GetPositionX(),plr->GetPositionY(),plr->GetPositionZ(),plr->GetOrientation(),0,0,0,0,100,1)) { delete go; -- cgit v1.2.3