aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quicktemplates2/qquicktumbler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicktumbler.cpp b/src/quicktemplates2/qquicktumbler.cpp
index 5f17cd29..4f7d3487 100644
--- a/src/quicktemplates2/qquicktumbler.cpp
+++ b/src/quicktemplates2/qquicktumbler.cpp
@@ -995,7 +995,7 @@ QQuickTumblerAttached::QQuickTumblerAttached(QObject *parent)
QQuickTumblerPrivate *tumblerPrivate = QQuickTumblerPrivate::get(d->tumbler);
tumblerPrivate->setupViewData(tumblerPrivate->contentItem);
- if (delegateItem->parentItem() == tumblerPrivate->viewContentItem) {
+ if (delegateItem && delegateItem->parentItem() == tumblerPrivate->viewContentItem) {
// This item belongs to the "new" view, meaning that the tumbler's contentItem
// was probably assigned declaratively. If they're not equal, calling
// calculateDisplacement() would use the old contentItem data, which is bad.