Fix crash with AnimatedImage caused by race condition.
authorGunnar Sletta <gunnar.sletta@nokia.com>
Mon, 5 Mar 2012 08:44:46 +0000 (09:44 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 5 Mar 2012 09:06:08 +0000 (10:06 +0100)
commit12048b91d95034725830a465c33c387cec26a971
tree206e655379fce117301df88b4254f8b8b0008cfd
parentc42ddc1003d3715567db16a5a03ad33b41840678
Fix crash with AnimatedImage caused by race condition.

In QDeclarativePixmap::setImage() we deleted a QDeclPixmapData
and recreated a new one in a very short timespan and the new
texture factory was the same pointer as the deleted one, yet a
queued destroyed signal was still emitted. Depending on when the
queued connection was handled in the rendering thread, this would
cause problems with the value returned from textureForFactory.

Change-Id: Ibd785ca12667c99efb88b92689ae7ac4fa87c7ee
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
src/quick/scenegraph/qsgcontext.cpp