diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-14 03:23:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-14 03:23:49 +0300 |
commit | eedeca17b9867762093e330d68bf21aea9e75fba (patch) | |
tree | e1acce6753ffedeff5ea4c80dc3399f6dd0260c9 /src/animatedsprite.cpp | |
parent | 1a04f34a62dc82833dbe994a9f11d543b6a78928 (diff) | |
download | ManaVerse-eedeca17b9867762093e330d68bf21aea9e75fba.tar.gz ManaVerse-eedeca17b9867762093e330d68bf21aea9e75fba.tar.bz2 ManaVerse-eedeca17b9867762093e330d68bf21aea9e75fba.tar.xz ManaVerse-eedeca17b9867762093e330d68bf21aea9e75fba.zip |
Add missing checks.
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r-- | src/animatedsprite.cpp | 8 |
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; } |