aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgitem_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-09-07 11:46:12 +0200
committerKim M. Kalland <kim.kalland@nokia.com>2011-09-07 12:22:12 +0200
commit40b0b72d7b228929f01c996fa36b1dc617c93a86 (patch)
treed57fa3b1427cd1c123d63e45eed7ab8d98855ef4 /src/declarative/items/qsgitem_p.h
parentbb7dd6aba4241a912699d6e332968c7f61017d7e (diff)
Fix QSGshaderEffectTexture cleanup
Because we often created it too early it did not have a QSGContext and would thus not clean up properly, causing crashes. Change-Id: I1f5c82c87326254885ec217aaab4f1e79d18a243 Reviewed-on: http://codereview.qt.nokia.com/4329 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/declarative/items/qsgitem_p.h')
-rw-r--r--src/declarative/items/qsgitem_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/items/qsgitem_p.h b/src/declarative/items/qsgitem_p.h
index 294edc0da4..513aba2bf6 100644
--- a/src/declarative/items/qsgitem_p.h
+++ b/src/declarative/items/qsgitem_p.h
@@ -258,7 +258,7 @@ public:
quint32 dummy:1;
QSGCanvas *canvas;
- QSGContext *sceneGraphContext() const { return static_cast<QSGCanvasPrivate *>(QObjectPrivate::get(canvas))->context; }
+ QSGContext *sceneGraphContext() const { Q_ASSERT(canvas); return static_cast<QSGCanvasPrivate *>(QObjectPrivate::get(canvas))->context; }
QSGItem *parentItem;
QList<QSGItem *> childItems;