From cbf1fe8c3a81a5eb09507eb98cd77481e1577972 Mon Sep 17 00:00:00 2001 From: Roberto Raggi <roberto.raggi@nokia.com> Date: Mon, 29 Mar 2010 10:45:18 +0200 Subject: [PATCH] Fixed possible crash when using completion when completing code in invalid documents. --- src/plugins/qmljseditor/qmljscodecompletion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmljseditor/qmljscodecompletion.cpp b/src/plugins/qmljseditor/qmljscodecompletion.cpp index 5293f65daa8..139e034539c 100644 --- a/src/plugins/qmljseditor/qmljscodecompletion.cpp +++ b/src/plugins/qmljseditor/qmljscodecompletion.cpp @@ -703,7 +703,7 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor) } // add qml extra words - if (document->qmlProgram()) { + if (document && document->qmlProgram()) { static QStringList qmlWords; if (qmlWords.isEmpty()) qmlWords << "property" << "readonly" << "signal"; -- GitLab