summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfilesystemmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 4644f0f04e..0db06e9b71 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -644,6 +644,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);
}