From 328d1d2fd6cba7368230a1232e080d3f3310a7f1 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Wed, 16 Nov 2011 13:20:45 +1000 Subject: Properly protect access to pixmap reader thread with mutex Previously, access to the reader thread wasn't guarded properly, causing a crash when the reader thread was deleted prior to QDeclarativePixmapData (which then attempted to dereference the thread pointer to cancel the request). This commit adds locking to ensure that access to the reader is protected properly. This commit also fixes an issue where if a QDeclarativePixmapData was deleted after its QDeclarativePixmapReply was removed from the jobs queue but prior to processing, a pointer to the data could be dereferenced as part of processing, but caching the required information in the reply. Task-number: QTBUG-22125 Change-Id: I32aa2ca41a297b48e68cb358f4aa4fafd999f215 Reviewed-by: Martin Jones --- .../qdeclarativepixmapcache/data/http/exists6.png | Bin 0 -> 2738 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativepixmapcache/data/http/exists6.png (limited to 'tests/auto/declarative/qdeclarativepixmapcache/data/http/exists6.png') diff --git a/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists6.png b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists6.png new file mode 100644 index 0000000000..399bd0b1d9 Binary files /dev/null and b/tests/auto/declarative/qdeclarativepixmapcache/data/http/exists6.png differ -- cgit v1.2.3