aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickshadereffectnode.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-28 16:27:08 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-28 18:04:04 +0200
commit05e9b6e8fc52b7c30d8769ed650b964e1969bbd2 (patch)
treec3b7e0d35e017fa38ee31e6a374cff0b931e4e50 /src/quick/items/qquickshadereffectnode.cpp
parentbb8c3906d8c71c063b779e07262fc2b122efeb9b (diff)
Don't qobject_cast an object being destructed
qobject_cast will cause the object's virtual metaObject() function to be called. Calling virtual functions in a destructor should be avoided. (The qobject_cast fails, and the assert is triggered.) Change-Id: I04a7604adb8884cd36731577303793c74c0a8673 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/quick/items/qquickshadereffectnode.cpp')
-rw-r--r--src/quick/items/qquickshadereffectnode.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp
index c4b91844e0..be1fb29904 100644
--- a/src/quick/items/qquickshadereffectnode.cpp
+++ b/src/quick/items/qquickshadereffectnode.cpp
@@ -407,7 +407,6 @@ void QQuickShaderEffectNode::markDirtyTexture()
void QQuickShaderEffectNode::textureProviderDestroyed(QObject *object)
{
- Q_ASSERT(qobject_cast<QSGTextureProvider *>(object));
m_material.invalidateTextureProvider(static_cast<QSGTextureProvider *>(object));
}