summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-18 00:20:42 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-18 00:20:42 +0300
commita7389fb365e2d66e4b5e6c14ff9bd78e4f663b40 (patch)
tree3f5dbaec5df6ece8f83be11a3f92999952af7514 /src/resources/mapreader.cpp
parent293d5be21d3f23102ed6d507fea3dc56a5df8024 (diff)
downloadplus-a7389fb365e2d66e4b5e6c14ff9bd78e4f663b40.tar.gz
plus-a7389fb365e2d66e4b5e6c14ff9bd78e4f663b40.tar.bz2
plus-a7389fb365e2d66e4b5e6c14ff9bd78e4f663b40.tar.xz
plus-a7389fb365e2d66e4b5e6c14ff9bd78e4f663b40.zip
add missing check.
Diffstat (limited to 'src/resources/mapreader.cpp')
-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;
}