summaryrefslogtreecommitdiff
path: root/src/animatedsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-14 03:23:49 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-14 03:23:49 +0300
commiteedeca17b9867762093e330d68bf21aea9e75fba (patch)
treee1acce6753ffedeff5ea4c80dc3399f6dd0260c9 /src/animatedsprite.cpp
parent1a04f34a62dc82833dbe994a9f11d543b6a78928 (diff)
downloadplus-eedeca17b9867762093e330d68bf21aea9e75fba.tar.gz
plus-eedeca17b9867762093e330d68bf21aea9e75fba.tar.bz2
plus-eedeca17b9867762093e330d68bf21aea9e75fba.tar.xz
plus-eedeca17b9867762093e330d68bf21aea9e75fba.zip
Add missing checks.
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r--src/animatedsprite.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp
index f58ef62cc..5d5c1ee18 100644
--- a/src/animatedsprite.cpp
+++ b/src/animatedsprite.cpp
@@ -268,16 +268,16 @@ unsigned int AnimatedSprite::getFrameCount() const
int AnimatedSprite::getWidth() const
{
- if (mFrame)
- return mFrame->image ? mFrame->image->getWidth() : 0;
+ if (mFrame && mFrame->image)
+ return mFrame->image->getWidth();
else
return 0;
}
int AnimatedSprite::getHeight() const
{
- if (mFrame)
- return mFrame->image ? mFrame->image->getHeight() : 0;
+ if (mFrame && mFrame->image)
+ return mFrame->image->getHeight();
else
return 0;
}