From: Christian Kamm Date: Thu, 29 Sep 2011 12:57:25 +0000 (+0200) Subject: Don't crash when QSGViewSection has a null parent. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=bc2f2c56296a77b215ccdf2ee907ef669e6ab609;p=konrad%2Fqtdeclarative.git Don't crash when QSGViewSection has a null parent. This is required to make qmlplugindump work. Change-Id: I041adde3e48759f9c3ae166c887a26ccb8f264f9 Reviewed-on: http://codereview.qt-project.org/5800 Reviewed-by: Roberto Raggi --- diff --git a/src/declarative/items/qsglistview.cpp b/src/declarative/items/qsglistview.cpp index b38c682..4aaf131 100644 --- a/src/declarative/items/qsglistview.cpp +++ b/src/declarative/items/qsglistview.cpp @@ -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) { }