Fix access to invalid memory in ~QQmlEnginePrivate
authorKai Koehne <kai.koehne@digia.com>
Tue, 2 Jul 2013 09:18:18 +0000 (11:18 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 3 Jul 2013 11:41:03 +0000 (13:41 +0200)
commit3fe9adaeb8330df02b63a79a601ac998704fc99b
tree5896b4ad6f98eef852082080db8145f50555dd96
parent14a1566fa034a88774a58a7200166dca6e080982
Fix access to invalid memory in ~QQmlEnginePrivate

~QQmlEnginePrivate tries to set incubationController->d to 0. However,
we're already setting the backpointer (q) of incubationController to 0
in ~QQmlEngine, so that the IncubationController destructor might run
in between without being able to reset incubationController.

To fix this, just handle the unsetting of incubationController once, in
~QQmlEnginePrivate.

Task-number: QTBUG-32161
Change-Id: I43a72dcfc0f95938ebfa67d3998adff1fb2d05a1
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
src/qml/qml/qqmlengine.cpp