diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index f165f2b3f01..cc033ae05c7 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -242,6 +242,10 @@ void ModelManager::writeMessageInternal(const QString &msg) const ModelManagerInterface::WorkingCopy ModelManager::workingCopyInternal() const { WorkingCopy workingCopy; + + if (!Core::ICore::instance()) + return workingCopy; + foreach (IDocument *document, DocumentModel::openedDocuments()) { const QString key = document->filePath().toString(); if (TextEditor::TextDocument *textDocument = qobject_cast(document)) {