From 565b2b6f51b85ee441c56155b9227446f4556e60 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 18 Jul 2014 12:44:06 +0200 Subject: [PATCH] Add a guard after figuring out the contentRect for a framesvgitem --- src/declarativeimports/core/framesvgitem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/declarativeimports/core/framesvgitem.cpp b/src/declarativeimports/core/framesvgitem.cpp index e2c14a7f4..b85a31ee5 100644 --- a/src/declarativeimports/core/framesvgitem.cpp +++ b/src/declarativeimports/core/framesvgitem.cpp @@ -99,6 +99,11 @@ public: FrameData* frameData = m_frameSvg->frameData(); QRect nodeRect = FrameSvgPrivate::sectionRect(frameData, m_border, frameGeometry); + + //ensure we're not passing a weird rectangle to updateTexturedRectGeometry + if(!nodeRect.isValid() || nodeRect.isEmpty()) + nodeRect = QRect(); + QRectF textureRect = QRectF(0,0,1,1); if (m_fitMode == Tile) { if (m_border == FrameSvg::TopBorder || m_border == FrameSvg::BottomBorder || m_border == FrameSvg::NoBorder) {