From 3dbdda0d3070a093f8a341f897ce4310a8b52bd2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 7 Mar 2016 18:37:50 +0300 Subject: Add some missing nonnull attributes to map/maplayer classes. --- src/resources/map/map.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/resources/map/map.cpp') diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index b2697ddcf..ada25e3d6 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -163,8 +163,6 @@ Map::~Map() config.removeListeners(this); CHECKLISTENERS - delete [] mMetaTiles; - if (mWalkLayer) { mWalkLayer->decRef(); @@ -186,6 +184,7 @@ Map::~Map() mAtlas = nullptr; } delete2(mHeights); + delete [] mMetaTiles; } void Map::optionChanged(const std::string &restrict value) restrict2 @@ -298,9 +297,6 @@ void Map::addLayer(MapLayer *const layer) restrict2 void Map::addTileset(Tileset *const tileset) restrict2 { - if (!tileset) - return; - mTilesets.push_back(tileset); const int height = tileset->getHeight(); if (height > mMaxTileHeight) -- cgit v1.2.3-70-g09d2