aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-23 09:48:31 +0100
committerLiang Qi <liang.qi@qt.io>2017-11-23 09:48:31 +0100
commit23e97360bdc1327ab1b3b3c7e7db69a7c56ef1e0 (patch)
treea58b73afe7893772b700507596eaded6f83544ba /src/quick
parenta79feeee451bcf28673292555795677a789e8513 (diff)
parent08778586413adad7b3af35c7cb97416757d599c0 (diff)
Merge remote-tracking branch 'origin/5.9.3' into 5.9
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp
index 10291b9cb5..8843b6450a 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp
@@ -490,12 +490,13 @@ QRectF QSGSoftwareInternalImageNode::rect() const
const QPixmap &QSGSoftwareInternalImageNode::pixmap() const
{
- if (QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture*>(m_texture)) {
+ if (QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture*>(m_texture))
return pt->pixmap();
- } else {
- QSGSoftwareLayer *layer = qobject_cast<QSGSoftwareLayer*>(m_texture);
+ if (QSGSoftwareLayer *layer = qobject_cast<QSGSoftwareLayer*>(m_texture))
return layer->pixmap();
- }
+ Q_ASSERT(m_texture == 0);
+ static const QPixmap nullPixmap;
+ return nullPixmap;
}
QT_END_NAMESPACE