summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/itemmodels/qfilesystemmodel.cpp2
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);
}