diff options
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map.cpp b/src/map.cpp index c3338f6d4..76947ad7d 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1252,12 +1252,10 @@ void Map::addPortal(const std::string &name, const int type, void Map::addPortalTile(const std::string &name, const int type, const int x, const int y) { - MapItem *item = new MapItem(type, name, x, y); if (mSpecialLayer) - mSpecialLayer->setTile(x, y, item); + mSpecialLayer->setTile(x, y, new MapItem(type, name, x, y)); - item = new MapItem(type, name, x, y); - mMapPortals.push_back(item); + mMapPortals.push_back(new MapItem(type, name, x, y)); } void Map::updatePortalTile(const std::string &name, const int type, |