Fix possible crash in QmlJS semantic checker.

This commit is contained in:
Christian Kamm
2010-02-18 10:37:42 +01:00
parent cd53a562e8
commit 499f7780e4

View File

@@ -190,8 +190,11 @@ void Check::checkScopeObjectMember(const AST::UiQualifiedId *id)
return;
// attached properties
if (! propertyName.isEmpty() && propertyName[0].isUpper())
if (! propertyName.isEmpty() && propertyName[0].isUpper()) {
scopeObject = _context.typeEnvironment(_doc.data());
if (! scopeObject)
return;
}
const Value *value = scopeObject->lookupMember(propertyName, &_context);
if (_extraScope && !value)