@@ -479,6 +479,12 @@ void ListViewWithPageHeader::componentComplete()
479479
480480void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
481481{
482+ // Check we are not being taken down and don't paint anything
483+ // TODO Check if we still need this in 5.2
484+ // For reproduction just inifnite loop testDash or testDashContent
485+ if (!QQmlEngine::contextForObject(this)->parentContext())
486+ return;
487+
482488 QQuickFlickable::viewportMoved(orient);
483489// qDebug() << "ListViewWithPageHeader::viewportMoved" << contentY();
484490 qreal diff = m_previousContentY - contentY();
@@ -855,6 +861,11 @@ void ListViewWithPageHeader::itemCreated(int modelIndex, QObject *object)
855861 }
856862#endif
857863// qDebug() << "ListViewWithPageHeader::itemCreated" << modelIndex << item;
864+ // Check we are not being taken down and don't paint anything
865+ // TODO Check if we still need this in 5.2
866+ // For reproduction just inifnite loop testDash or testDashContent
867+ if (!QQmlEngine::contextForObject(this)->parentContext())
868+ return;
858869
859870 item->setParentItem(m_clipItem);
860871 QQmlContext *context = QQmlEngine::contextForObject(item)->parentContext();
@@ -1235,6 +1246,12 @@ void ListViewWithPageHeader::layout()
12351246
12361247void ListViewWithPageHeader::updatePolish()
12371248{
1249+ // Check we are not being taken down and don't paint anything
1250+ // TODO Check if we still need this in 5.2
1251+ // For reproduction just inifnite loop testDash or testDashContent
1252+ if (!QQmlEngine::contextForObject(this)->parentContext())
1253+ return;
1254+
12381255 Q_FOREACH(ListItem *item, m_itemsToRelease)
12391256 reallyReleaseItem(item);
12401257 m_itemsToRelease.clear();