summaryrefslogtreecommitdiff
path: root/src/resources/atlasmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-24 18:41:42 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 22:08:24 +0300
commitd49a520d19f28c613c68b574686b182a9c0621be (patch)
tree5b6943125fd364eaaaaa295b45100cdfc473dd93 /src/resources/atlasmanager.cpp
parent14f55eb8c6e44763e70046b9661bd056280226a5 (diff)
downloadplus-d49a520d19f28c613c68b574686b182a9c0621be.tar.gz
plus-d49a520d19f28c613c68b574686b182a9c0621be.tar.bz2
plus-d49a520d19f28c613c68b574686b182a9c0621be.tar.xz
plus-d49a520d19f28c613c68b574686b182a9c0621be.zip
Add missing checks into resources directory.
Diffstat (limited to 'src/resources/atlasmanager.cpp')
-rw-r--r--src/resources/atlasmanager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index f7afab0f6..23a1ec653 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -319,6 +319,8 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas)
void AtlasManager::injectToResources(const AtlasResource *const resource)
{
+ if (!resource)
+ return;
ResourceManager *const resman = ResourceManager::getInstance();
FOR_EACH (std::vector<TextureAtlas*>::const_iterator,
it, resource->atlases)
@@ -344,6 +346,8 @@ void AtlasManager::injectToResources(const AtlasResource *const resource)
void AtlasManager::moveToDeleted(AtlasResource *const resource)
{
+ if (!resource)
+ return;
ResourceManager *const resman = ResourceManager::getInstance();
FOR_EACH (std::vector<TextureAtlas*>::iterator, it, resource->atlases)
{