diff options
author | Inho Lee <inho.lee@qt.io> | 2022-11-23 20:09:30 +0100 |
---|---|---|
committer | Inho Lee <inho.lee@qt.io> | 2022-11-25 09:48:06 +0000 |
commit | 7a8f65ab4d6bf87b28262a9cf0f1fe2c82d03d8b (patch) | |
tree | 3c580f7c5af3a18b9a6bb70e0832b112edbb0453 /src | |
parent | 88ef3a78af80a1df36da1a920b00a6c33243be65 (diff) |
ShaderEffect: call derefWindow from the proper source
It was fixed with commit 9a3f40c45098056662cac4af5daa4e29d7476991 but
6.4 still has the same issue.
Fixes: QTBUG-108683
Change-Id: I8e885e4e9aa6a2cff99ce6a7fd29aa9baa666c89
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickshadereffect.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp index 917a1257a4..ad254bfde1 100644 --- a/src/quick/items/qquickshadereffect.cpp +++ b/src/quick/items/qquickshadereffect.cpp @@ -1530,10 +1530,11 @@ void QQuickShaderEffectImpl::propertyChanged(int mappedId) const auto &v(m_shaders[type].shaderInfo.variables[idx]); auto &vd(m_shaders[type].varData[idx]); + QVariant oldValue = vd.value; vd.value = getValueFromProperty(m_item, m_itemMetaObject, v.name, vd.propertyIndex); if (vd.specialType == QSGShaderEffectNode::VariableData::Source) { - QQuickItem *source = qobject_cast<QQuickItem *>(qvariant_cast<QObject *>(vd.value)); + QQuickItem *source = qobject_cast<QQuickItem *>(qvariant_cast<QObject *>(oldValue)); if (source) { if (m_item->window()) QQuickItemPrivate::get(source)->derefWindow(); |