Fix possible crash in QmlJS semantic checker.

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

View File

@@ -190,11 +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;
}
if (! scopeObject)
return;
const Value *value = scopeObject->lookupMember(propertyName, &_context);
if (_extraScope && !value)