diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index 40ddf9759b5..450538dac2f 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -75,10 +75,12 @@ static bool addFilesToResource(const QString &resourceFile, const QStringList &f if (notAdded) notAdded->clear(); foreach (const QString &path, filePaths) { - if (file.contains(index, path)) - *notAdded << path; - else + if (file.contains(index, path)) { + if (notAdded) + *notAdded << path; + } else { file.addFile(index, path); + } } Core::DocumentManager::expectFileChange(resourceFile);