diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-03-12 11:54:11 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-13 05:13:50 +0100 |
commit | fa9fcf2fb259b1b3eb09e0c853075ca328e930c5 (patch) | |
tree | 0f323769275439b29ed22e1cde38ae4a1cf65865 /src/qml/qml/qqmlproperty_p.h | |
parent | 340c479bb17c8c14013cedd7c8eece30bf206c89 (diff) |
Fix crash when writing property after engine deletion
Previously, the engine pointer stored in a QQmlProperty could be
stale due to engine deletion. This commit ensures we guard that
pointer.
Also reverts cbb7f8b10e99fad675839d7625d3236ed67b3e01
Task-number: QTBUG-24734
Change-Id: I5349c51fbd19fa46a8710280173c1d224358b96e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlproperty_p.h')
-rw-r--r-- | src/qml/qml/qqmlproperty_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlproperty_p.h b/src/qml/qml/qqmlproperty_p.h index 0f97a63155..dc0235517d 100644 --- a/src/qml/qml/qqmlproperty_p.h +++ b/src/qml/qml/qqmlproperty_p.h @@ -54,6 +54,7 @@ // #include "qqmlproperty.h" +#include "qqmlengine.h" #include <private/qobject_p.h> #include <private/qtqmlglobal_p.h> @@ -77,7 +78,7 @@ public: Q_DECLARE_FLAGS(WriteFlags, WriteFlag) QQmlContextData *context; - QQmlEngine *engine; + QQmlGuard<QQmlEngine> engine; QQmlGuard<QObject> object; QQmlPropertyData core; |