QmlJS: Add missing null checks before using scopeChain().qmlTypes.

This commit is contained in:
Christian Kamm
2010-08-30 13:31:50 +02:00
parent bfad59df64
commit 32bb7bffc0
3 changed files with 6 additions and 3 deletions

View File

@@ -309,7 +309,8 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
bool isAttachedProperty = false;
if (! propertyName.isEmpty() && propertyName[0].isUpper()) {
isAttachedProperty = true;
scopeObjects += _context.scopeChain().qmlTypes;
if (const ObjectValue *qmlTypes = _context.scopeChain().qmlTypes)
scopeObjects += qmlTypes;
}
if (scopeObjects.isEmpty())