Don't qobject_cast an object being destructed
authorKent Hansen <kent.hansen@nokia.com>
Wed, 28 Mar 2012 14:27:08 +0000 (16:27 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 28 Mar 2012 16:04:04 +0000 (18:04 +0200)
commit05e9b6e8fc52b7c30d8769ed650b964e1969bbd2
treec3b7e0d35e017fa38ee31e6a374cff0b931e4e50
parentbb8c3906d8c71c063b779e07262fc2b122efeb9b
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>
src/quick/items/qquickshadereffectnode.cpp