Fixed crash in tst_qglthreads.
authorSamuel Rødal <samuel.rodal@digia.com>
Mon, 26 Nov 2012 15:39:40 +0000 (16:39 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 26 Nov 2012 16:33:37 +0000 (17:33 +0100)
commit6633dbbac49f4ce8a89b67090fdffaa8c8126eb5
treec0112f9b3dd218d79599d4727111c688e2b7f57a
parent8534bb3dd661aa9875a0cede1b05038e43c215a0
Fixed crash in tst_qglthreads.

QGLTextureCache has a read write locker to protect texture lookups.
However, even calling QCache::object() might modify the cache, causing
race conditions, since it modifies the priority order of the objects in
the cache. Therefore, we need to protect it with a QWriteLocker instead
of a QReadLocker.

Task-number: QTBUG-22560
Change-Id: I46fffc624ace27e25fb100f865e1df0a19b9093d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
src/opengl/qgl_p.h