From 4f3be92208722816fdc2f78dcd577ff0706b1434 Mon Sep 17 00:00:00 2001 From: Henrique Santiago Date: Thu, 7 Feb 2013 03:37:57 -0200 Subject: [PATCH] Refix last commit --- src/client/thing.h | 2 -- src/client/thingtype.cpp | 3 +++ src/client/uiitem.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/thing.h b/src/client/thing.h index 24815d1e..03934250 100644 --- a/src/client/thing.h +++ b/src/client/thing.h @@ -59,8 +59,6 @@ public: virtual bool isAnimatedText() { return false; } virtual bool isStaticText() { return false; } - virtual bool isValid() { return rawGetThingType() != nullptr; } - // type shortcuts virtual const ThingTypePtr& getThingType(); virtual ThingType *rawGetThingType(); diff --git a/src/client/thingtype.cpp b/src/client/thingtype.cpp index 0755ac69..8d53940c 100644 --- a/src/client/thingtype.cpp +++ b/src/client/thingtype.cpp @@ -336,6 +336,9 @@ uint ThingType::getTextureIndex(int l, int x, int y, int z) { int ThingType::getExactSize(int layer, int xPattern, int yPattern, int zPattern, int animationPhase) { + if(m_null) + return 0; + getTexture(animationPhase); // we must calculate it anyway. int frameIndex = getTextureIndex(layer, xPattern, yPattern, zPattern); Size size = m_texturesFramesOriginRects[animationPhase][frameIndex].size() - m_texturesFramesOffsets[animationPhase][frameIndex].toSize(); diff --git a/src/client/uiitem.cpp b/src/client/uiitem.cpp index fdd700a2..eb062013 100644 --- a/src/client/uiitem.cpp +++ b/src/client/uiitem.cpp @@ -44,7 +44,7 @@ void UIItem::drawSelf(Fw::DrawPane drawPane) drawImage(m_rect); - if(m_itemVisible && m_item && m_item->isValid()) { + if(m_itemVisible && m_item) { Rect drawRect = getPaddingRect(); Point dest = drawRect.bottomRight() + Point(1,1);