summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resources/mapreader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 2b2edb3de..3b244b91f 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -481,7 +481,8 @@ inline static void setTile(Map *const map, MapLayer *const layer,
{
Image *const img = set ? set->get(gid - set->getFirstGid())
: nullptr;
- layer->setTile(x, y, img);
+ if (layer)
+ layer->setTile(x, y, img);
}
break;
}