diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-10-26 01:57:45 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-26 02:02:23 (GMT) |
commit | 24498457049f0504d0b09935dea6ca6a5634bb2d (patch) | |
tree | 3ec9f9ba7e57b8ad3a6b043009f91aab926929c8 /src/declarative/util | |
parent | 05d3e827565d635e75cfd49e46b3ba72903a1e6f (diff) | |
download | Qt-24498457049f0504d0b09935dea6ca6a5634bb2d.zip Qt-24498457049f0504d0b09935dea6ca6a5634bb2d.tar.gz Qt-24498457049f0504d0b09935dea6ca6a5634bb2d.tar.bz2 |
Fix crash.
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qmlpropertychanges.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp index a112245..bed27fe 100644 --- a/src/declarative/util/qmlpropertychanges.cpp +++ b/src/declarative/util/qmlpropertychanges.cpp @@ -85,7 +85,8 @@ class QmlReplaceSignalHandler : public ActionEvent public: QmlReplaceSignalHandler() : expression(0), reverseExpression(0), ownedExpression(0) {} ~QmlReplaceSignalHandler() { - delete ownedExpression; + if (ownedExpression) + delete ownedExpression; } virtual QString typeName() const { return QLatin1String("ReplaceSignalHandler"); } @@ -93,7 +94,7 @@ public: QmlMetaProperty property; QmlExpression *expression; QmlExpression *reverseExpression; - QmlExpression *ownedExpression; + QGuard<QmlExpression> ownedExpression; virtual void execute() { ownedExpression = property.setSignalExpression(expression); @@ -272,7 +273,6 @@ QmlPropertyChanges::~QmlPropertyChanges() delete d->expressions.at(ii).second; for(int ii = 0; ii < d->signalReplacements.count(); ++ii) delete d->signalReplacements.at(ii); - } QObject *QmlPropertyChanges::object() const |