forked from qt-creator/qt-creator
Fixed possible crash when using completion when completing code in invalid documents.
This commit is contained in:
@@ -703,7 +703,7 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add qml extra words
|
// add qml extra words
|
||||||
if (document->qmlProgram()) {
|
if (document && document->qmlProgram()) {
|
||||||
static QStringList qmlWords;
|
static QStringList qmlWords;
|
||||||
if (qmlWords.isEmpty())
|
if (qmlWords.isEmpty())
|
||||||
qmlWords << "property" << "readonly" << "signal";
|
qmlWords << "property" << "readonly" << "signal";
|
||||||
|
|||||||
Reference in New Issue
Block a user