summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-01-18 21:40:52 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-01-18 21:40:52 +0100
commitf4abf6b94adf53db7a053f7c342cc79f69a03262 (patch)
treea167e3e705ab4e49a74b19dcd27a116ee930710e
parent5340364ee4b91d5d26358d1ec131016946f2998b (diff)
downloadmana-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.cpp8
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());
+ }
}
}
}