forked from qt-creator/qt-creator
Fix possible crash in QmlJS semantic checker.
This commit is contained in:
@@ -190,8 +190,11 @@ void Check::checkScopeObjectMember(const AST::UiQualifiedId *id)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// attached properties
|
// attached properties
|
||||||
if (! propertyName.isEmpty() && propertyName[0].isUpper())
|
if (! propertyName.isEmpty() && propertyName[0].isUpper()) {
|
||||||
scopeObject = _context.typeEnvironment(_doc.data());
|
scopeObject = _context.typeEnvironment(_doc.data());
|
||||||
|
if (! scopeObject)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const Value *value = scopeObject->lookupMember(propertyName, &_context);
|
const Value *value = scopeObject->lookupMember(propertyName, &_context);
|
||||||
if (_extraScope && !value)
|
if (_extraScope && !value)
|
||||||
|
Reference in New Issue
Block a user