Do not create a QSGNode when size is 0

This fixes a crash when resizing an icon to be super small
This commit is contained in:
David Edmundson 2014-05-16 15:43:43 +02:00
parent 2d29445164
commit 2f16595036

View File

@ -191,7 +191,7 @@ QSGNode* IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update
{
Q_UNUSED(updatePaintNodeData)
if (m_iconPixmap.isNull()) {
if (m_iconPixmap.isNull() || width() == 0 || height() == 0) {
delete oldNode;
return Q_NULLPTR;
}