summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-01-18 21:40:52 +0100
committerIra Rice <irarice@gmail.com>2009-01-18 15:45:01 -0700
commit7b38f31192be70463cfa1fa6f0ffe13181fc26a9 (patch)
tree3bcfb9a09772c2ceb6d52259f1e5e09e877db414 /src/resources/mapreader.cpp
parent3b367d91c41323e4ea18cce6b67f3791f7d25b3a (diff)
downloadmana-client-7b38f31192be70463cfa1fa6f0ffe13181fc26a9.tar.gz
mana-client-7b38f31192be70463cfa1fa6f0ffe13181fc26a9.tar.bz2
mana-client-7b38f31192be70463cfa1fa6f0ffe13181fc26a9.tar.xz
mana-client-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/mapreader.cpp')
-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 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());
+ }
}
}
}