aboutsummaryrefslogtreecommitdiff
path: root/src/game/OutdoorPvPSI.cpp
diff options
context:
space:
mode:
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;