@@ -286,9 +286,11 @@ void ListViewWithPageHeader::setSectionDelegate(QQmlComponent *delegate)
286286 m_sectionDelegate = delegate;
287287
288288 m_topSectionItem = getSectionItem(QString(), false /*watchGeometry*/);
289− m_topSectionItem->setZ(3);
290− QQuickItemPrivate::get(m_topSectionItem)->setCulled(true);
291− connect(m_topSectionItem, &QQuickItem::heightChanged, this, &ListViewWithPageHeader::stickyHeaderHeightChanged);
289+ if (m_topSectionItem) {
290+ m_topSectionItem->setZ(3);
291+ QQuickItemPrivate::get(m_topSectionItem)->setCulled(true);
292+ connect(m_topSectionItem, &QQuickItem::heightChanged, this, &ListViewWithPageHeader::stickyHeaderHeightChanged);
293+ }
292294
293295 // TODO create sections for existing items
294296
@@ -775,7 +777,7 @@ QQuickItem *ListViewWithPageHeader::getSectionItem(const QString §ionText, b
775777 }
776778 m_sectionDelegate->completeCreate();
777779
778− if (watchGeometry) {
780+ if (watchGeometry && sectionItem) {
779781 QQuickItemPrivate::get(sectionItem)->addItemChangeListener(this, QQuickItemPrivate::Geometry);
780782 }
781783