diff options
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp index 71d0f5ee4..e68f063d9 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -159,7 +159,8 @@ Map::Map(const int width, const int height, mDrawScrollY(-1), mRedrawMap(true), mBeingOpacity(false), - mCustom(false) + mCustom(false), + mAtlas(nullptr) { const int size = mWidth * mHeight; for (int i = 0; i < NB_BLOCKTYPES; i++) @@ -200,6 +201,11 @@ Map::~Map() delete mObjects; mObjects = nullptr; delete_all(mMapPortals); + if (mAtlas) + { + mAtlas->decRef(); + mAtlas = nullptr; + } } void Map::optionChanged(const std::string &value) |