Don't crash when QSGViewSection has a null parent.
authorChristian Kamm <christian.d.kamm@nokia.com>
Thu, 29 Sep 2011 12:57:25 +0000 (14:57 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Sep 2011 13:01:13 +0000 (15:01 +0200)
This is required to make qmlplugindump work.

Change-Id: I041adde3e48759f9c3ae166c887a26ccb8f264f9
Reviewed-on: http://codereview.qt-project.org/5800
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/declarative/items/qsglistview.cpp

index b38c682..4aaf131 100644 (file)
@@ -175,7 +175,7 @@ public:
 
 QSGViewSection::QSGViewSection(QSGListView *parent)
     : QObject(parent), m_criteria(FullString), m_delegate(0), m_labelPositioning(InlineLabels)
-    , m_view(QSGListViewPrivate::get(parent))
+    , m_view(parent ? QSGListViewPrivate::get(parent) : 0)
 {
 }