Fix crash when clientid is invalid

master
Henrique Santiago 11 years ago
parent 2f7a06e93e
commit 3c3ba9ef4c

@ -59,6 +59,8 @@ 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();

@ -44,7 +44,7 @@ void UIItem::drawSelf(Fw::DrawPane drawPane)
drawImage(m_rect);
if(m_itemVisible && m_item) {
if(m_itemVisible && m_item && m_item->isValid()) {
Rect drawRect = getPaddingRect();
Point dest = drawRect.bottomRight() + Point(1,1);

Loading…
Cancel
Save