From eedeca17b9867762093e330d68bf21aea9e75fba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 14 May 2011 03:23:49 +0300 Subject: Add missing checks. --- src/animatedsprite.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/animatedsprite.cpp') 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; } -- cgit v1.2.3-70-g09d2