From 29ad6702ab90fc75fe9d0422609609fd15123fc3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 26 Sep 2012 01:57:54 +0300 Subject: Some error fixes in atlases. Check if image already in cache and check for mapinfo before using it. --- src/resources/mapreader.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/resources/mapreader.cpp') diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index f81741227..ede630d0c 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -279,8 +279,11 @@ Map *MapReader::readMap(XmlNodePtr node, const std::string &path) if (graphicsManager.getUseAtlases()) { const MapDB::MapInfo *const info = MapDB::getMapAtlas(fileName); - map->setAtlas(ResourceManager::getInstance()->getAtlas( - info->atlas, *info->files)); + if (info) + { + map->setAtlas(ResourceManager::getInstance()->getAtlas( + info->atlas, *info->files)); + } } #endif -- cgit v1.2.3-70-g09d2