aboutsummaryrefslogtreecommitdiff
path: root/src/game/OutdoorPvPSI.cpp
diff options
context:
space:
mode:
authorraczman <none@none>2009-05-13 14:06:33 +0200
committerraczman <none@none>2009-05-13 14:06:33 +0200
commitbfaaa8201e6887fedd2145d668f40a484a609dac (patch)
tree869eeca5c3f71d64d15e4eb28b2f4fad70f36fad /src/game/OutdoorPvPSI.cpp
parent5748c36621f36a64cad29243dfe880291826059a (diff)
Possibly fixed more memory leaks in other places.
--HG-- branch : trunk
Diffstat (limited to 'src/game/OutdoorPvPSI.cpp')
-rw-r--r--src/game/OutdoorPvPSI.cpp9
1 files changed, 7 insertions, 2 deletions
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;