summaryrefslogtreecommitdiff
path: root/src/resources/atlasmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/atlasmanager.cpp')
-rw-r--r--src/resources/atlasmanager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index 9ff01b9c4..0d43d59c8 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -256,14 +256,15 @@ SDL_Surface *AtlasManager::createSDLAtlas(TextureAtlas *atlas)
void AtlasManager::convertAtlas(TextureAtlas *atlas)
{
+ // no check for null pointer in atlas because it was in caller
// convert surface to OpemGL image
atlas->atlasImage = imageHelper->load(atlas->surface);
Image *const image = atlas->atlasImage;
- if (image)
- {
- image->mIdPath = atlas->name;
- image->incRef();
- }
+ if (!image)
+ return;
+
+ image->mIdPath = atlas->name;
+ image->incRef();
FOR_EACH (std::vector<AtlasItem*>::iterator, it, atlas->items)
{