diff options
Diffstat (limited to 'src/gui/itemviews/qtreewidget.cpp')
-rw-r--r-- | src/gui/itemviews/qtreewidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index ee7cea3..025f83c 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -2074,6 +2074,8 @@ QList<QTreeWidgetItem*> QTreeWidgetItem::takeChildren() void QTreeWidgetItemPrivate::sortChildren(int column, Qt::SortOrder order, bool climb) { QTreeModel *model = (q->view ? qobject_cast<QTreeModel*>(q->view->model()) : 0); + if (!model) + return; model->sortItems(&q->children, column, order); if (climb) { QList<QTreeWidgetItem*>::iterator it = q->children.begin(); |