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:
parent
2d29445164
commit
2f16595036
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user