aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-04 09:40:40 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-04 09:40:41 +0100
commit8e72580db8ab1ae5f8a1f3b1104bfc111ccb9573 (patch)
treee1966936569372f3c2ca2748abe1f8ee2b130c1b /src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
parent0d3eccd2a982faa46e8515cd5c55f95adcc5f868 (diff)
parente3c0bb7811407bad1f65ea55639a4b1d1d39be15 (diff)
Merge remote-tracking branch 'origin/5.11.3' into 5.11
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
index 1463681fa3..68341ebb3e 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
@@ -144,10 +144,11 @@ void QSGSoftwareNinePatchNode::setTexture(QSGTexture *texture)
QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture*>(texture);
if (!pt) {
qWarning() << "Image used with invalid texture format.";
- return;
+ } else {
+ m_pixmap = pt->pixmap();
+ markDirty(DirtyMaterial);
}
- m_pixmap = pt->pixmap();
- markDirty(DirtyMaterial);
+ delete texture;
}
void QSGSoftwareNinePatchNode::setBounds(const QRectF &bounds)