summaryrefslogtreecommitdiff
path: root/src/effects
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@sletta.org>2016-02-25 11:37:09 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2016-02-25 10:44:42 +0000
commit4b8e9a348ca379b203c26ff14dd236267dd60646 (patch)
tree2bc965cb5770feb78e5046816c5f9a2cfed4491e /src/effects
parent2f0e5e726d76b8ad5a0e9b07aeb57006490e18b4 (diff)
downloadqtgraphicaleffects-5.6.0.tar.gz
Fix crash when a ShaderEffectSource is missing a sourceItemv5.6.05.6.0
Task-number: QTBUG-51375 Change-Id: I98029d5a617c730a18897bebae27cf14c1d7b876 Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/private/qgfxsourceproxy.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/effects/private/qgfxsourceproxy.cpp b/src/effects/private/qgfxsourceproxy.cpp
index bd55ff0..a94d574 100644
--- a/src/effects/private/qgfxsourceproxy.cpp
+++ b/src/effects/private/qgfxsourceproxy.cpp
@@ -102,6 +102,8 @@ void QGfxSourceProxy::useProxy()
QObject *QGfxSourceProxy::findLayer(QQuickItem *item)
{
+ if (!item)
+ return 0;
QQuickItemPrivate *d = QQuickItemPrivate::get(item);
if (d->extra.isAllocated() && d->extra->layer) {
QObject *layer = qvariant_cast<QObject *>(item->property("layer"));