diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemmodels/qfilesystemmodel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/itemmodels/qfilesystemmodel.cpp b/src/gui/itemmodels/qfilesystemmodel.cpp index 481f11162a..bb9a5a1d43 100644 --- a/src/gui/itemmodels/qfilesystemmodel.cpp +++ b/src/gui/itemmodels/qfilesystemmodel.cpp @@ -638,6 +638,8 @@ bool QFileSystemModel::hasChildren(const QModelIndex &parent) const bool QFileSystemModel::canFetchMore(const QModelIndex &parent) const { Q_D(const QFileSystemModel); + if (!d->setRootPath) + return false; const QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(parent); return (!indexNode->populatedChildren); } |