Skip to content
Snippets Groups Projects
Commit 8fbf0dd0 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

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

parent fc578939
No related branches found
No related tags found
No related merge requests found
...@@ -340,6 +340,12 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id) ...@@ -340,6 +340,12 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
return 0; 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; idPart = idPart->next;
propertyName = idPart->name->asString(); propertyName = idPart->name->asString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment