LVWPH: Do not crash on showHeader if we don't have a header
commit90ced63b304397f5694b5638ee0248e0880d327f
authorAlbert Astals <albert.astals@canonical.com>
dateTue 2 Jul 2013, 10:45 (13 years ago)
parentd894886
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+3
@@ -342,6 +342,9 @@ void ListViewWithPageHeader::positionAtBeginning()
342342
343343void ListViewWithPageHeader::showHeader()
344344{
345+ if (!m_headerItem)
346+ return;
347+
345348 auto to = qMax(-minYExtent(), contentY() - m_headerItem->height() + m_headerItemShownHeight);
346349 if (to != contentY()) {
347350 m_headerShowAnimation->setTo(to);