summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeflipable.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-18 23:50:52 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-21 23:04:58 (GMT)
commit44b1fc2051df2bfd784ce847ee430edad68e3dbd (patch)
tree86dd7abd1fb0d3aedb6e2caa242167d00b3203de /src/declarative/graphicsitems/qdeclarativeflipable.cpp
parent83f6232cadb5bfeeeec170bb17224c4032031dd7 (diff)
downloadQt-44b1fc2051df2bfd784ce847ee430edad68e3dbd.zip
Qt-44b1fc2051df2bfd784ce847ee430edad68e3dbd.tar.gz
Qt-44b1fc2051df2bfd784ce847ee430edad68e3dbd.tar.bz2
Fix Flipable crash.
Task-number: QTBUG-9161
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeflipable.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 1ebbaee..8b46039 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -42,6 +42,7 @@
#include "qdeclarativeflipable_p.h"
#include "qdeclarativeitem_p.h"
+#include "qdeclarativeguard_p.h"
#include <qdeclarativeinfo.h>
@@ -58,8 +59,8 @@ public:
void updateSceneTransformFromParent();
QDeclarativeFlipable::Side current;
- QDeclarativeItem *front;
- QDeclarativeItem *back;
+ QDeclarativeGuard<QDeclarativeItem> front;
+ QDeclarativeGuard<QDeclarativeItem> back;
};
/*!
@@ -192,7 +193,7 @@ void QDeclarativeFlipablePrivate::updateSceneTransformFromParent()
if (newSide != current) {
current = newSide;
- if (current == QDeclarativeFlipable::Back) {
+ if (current == QDeclarativeFlipable::Back && back) {
QTransform mat;
mat.translate(back->width()/2,back->height()/2);
if (back->width() && p1.x() >= p2.x())