forked from qt-creator/qt-creator
QmlJS: Add missing null check for completion in string literals.
This commit is contained in:
@@ -781,7 +781,9 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
|
||||
if (contextFinder.isInStringLiteral()) {
|
||||
const Interpreter::Value *value = getPropertyValue(qmlScopeType, contextFinder.bindingPropertyName(), context);
|
||||
|
||||
if (value->asUrlValue()) {
|
||||
if (!value) {
|
||||
// do nothing
|
||||
} else if (value->asUrlValue()) {
|
||||
QTextCursor tc = edit->textCursor();
|
||||
QmlExpressionUnderCursor expressionUnderCursor;
|
||||
expressionUnderCursor(tc);
|
||||
|
||||
Reference in New Issue
Block a user