diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-18 21:40:52 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-18 15:45:01 -0700 |
commit | 7b38f31192be70463cfa1fa6f0ffe13181fc26a9 (patch) | |
tree | 3bcfb9a09772c2ceb6d52259f1e5e09e877db414 /src/resources | |
parent | 3b367d91c41323e4ea18cce6b67f3791f7d25b3a (diff) | |
download | mana-7b38f31192be70463cfa1fa6f0ffe13181fc26a9.tar.gz mana-7b38f31192be70463cfa1fa6f0ffe13181fc26a9.tar.bz2 mana-7b38f31192be70463cfa1fa6f0ffe13181fc26a9.tar.xz mana-7b38f31192be70463cfa1fa6f0ffe13181fc26a9.zip |
Fixed mapreader crash caused by unknown tile properties (That's why I said that I would like some praxis-oriented testing of the animation system before the release).
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/mapreader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 04019d32..802199f1 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -532,8 +532,12 @@ Tileset *MapReader::readTileset(xmlNodePtr node, break; } } - map->addAnimation(tileGID, new TileAnimation(ani)); - logger->log("Animation length: %d", ani->getLength()); + + if (ani->getLength() > 0) + { + map->addAnimation(tileGID, new TileAnimation(ani)); + logger->log("Animation length: %d", ani->getLength()); + } } } } |