diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-18 21:40:52 +0100 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-18 21:40:52 +0100 |
commit | f4abf6b94adf53db7a053f7c342cc79f69a03262 (patch) | |
tree | a167e3e705ab4e49a74b19dcd27a116ee930710e | |
parent | 5340364ee4b91d5d26358d1ec131016946f2998b (diff) | |
download | mana-f4abf6b94adf53db7a053f7c342cc79f69a03262.tar.gz mana-f4abf6b94adf53db7a053f7c342cc79f69a03262.tar.bz2 mana-f4abf6b94adf53db7a053f7c342cc79f69a03262.tar.xz mana-f4abf6b94adf53db7a053f7c342cc79f69a03262.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).
-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 4e116889..15fbf68a 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -531,8 +531,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()); + } } } } |