Fix crash in QDeclarativePixmapStore global static dtor
authorChris Adams <christopher.adams@nokia.com>
Tue, 28 Feb 2012 04:04:38 +0000 (14:04 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 28 Feb 2012 04:37:43 +0000 (05:37 +0100)
commite6c5e06c0879a80ecff01b316a4fc148b3646437
tree71030cd89860e57ebdeeb7f32d76e48659b420bd
parentf2c5c77777b61c8fe54a1107e67283d576301a69
Fix crash in QDeclarativePixmapStore global static dtor

Due to the undefined ordering of global static dtors, the QDPS dtor
could run after the texture factories were deleted.  Thus, the QDPS
dtor cannot call the cost() method of the pixmap data during its
destructor, as this could cause a crash.

Change-Id: I5d23066dc57e1992cf9d1c13d514f06c431bc752
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
src/declarative/qml/qdeclarativeimageprovider.h
src/quick/util/qdeclarativepixmapcache.cpp