forked from qt-creator/qt-creator
QmlJS: Fix code completion when no semantic info is available.
This commit is contained in:
@@ -681,6 +681,9 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
|
|||||||
const QmlJS::Snapshot snapshot = semanticInfo.snapshot;
|
const QmlJS::Snapshot snapshot = semanticInfo.snapshot;
|
||||||
const Document::Ptr document = semanticInfo.document;
|
const Document::Ptr document = semanticInfo.document;
|
||||||
|
|
||||||
|
if (!document)
|
||||||
|
return -1;
|
||||||
|
|
||||||
const QFileInfo currentFileInfo(fileName);
|
const QFileInfo currentFileInfo(fileName);
|
||||||
|
|
||||||
bool isQmlFile = false;
|
bool isQmlFile = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user