Skip to content
Snippets Groups Projects
Commit b5869e97 authored by Daniel Teske's avatar Daniel Teske
Browse files

Fix crash on FlatModel::added with empty list


Change-Id: I6a5970eb9ccd76e730203c2d95dbd4e4dbb4af8a
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 2bf61524
No related branches found
No related tags found
No related merge requests found
......@@ -617,6 +617,12 @@ void FlatModel::added(FolderNode* parentNode, const QList<Node*> &newNodeList)
qCDebug(logger()) << "FlatModel::added" << parentNode->path() << newNodeList.size() << "nodes";
QModelIndex parentIndex = indexForNode(parentNode);
// Old list
if (newNodeList.isEmpty()) {
qCDebug(logger()) << " newNodeList empty";
return;
}
QHash<FolderNode*, QList<Node*> >::const_iterator it = m_childNodes.constFind(parentNode);
if (it == m_childNodes.constEnd()) {
if (!parentIndex.isValid()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment