summaryrefslogtreecommitdiff
path: root/src/animatedsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r--src/animatedsprite.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp
index bd00ede8..9f4e46bd 100644
--- a/src/animatedsprite.cpp
+++ b/src/animatedsprite.cpp
@@ -201,7 +201,9 @@ size_t AnimatedSprite::getCurrentFrame() const
size_t AnimatedSprite::getFrameCount() const
{
- return mAnimation->getLength();
+ if (mAnimation)
+ return mAnimation->getLength();
+ return 0;
}
int AnimatedSprite::getWidth() const