Fixed possible crash when error recovery yielded a partially correct AST.

This commit is contained in:
Erik Verbruggen
2010-02-24 17:14:14 +01:00
parent fc57893921
commit 8fbf0dd08f

View File

@@ -340,6 +340,12 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
return 0;
}
if (! idPart->next->name) {
// somebody typed "id." and error recovery still gave us a valid tree,
// so just bail out here.
return 0;
}
idPart = idPart->next;
propertyName = idPart->name->asString();