Defensiveness against invalid data

This commit is contained in:
Thomas Krijnen
2024-09-11 20:13:50 +02:00
parent f5e02d1413
commit 5a44a8e325
+1 -1
View File
@@ -709,7 +709,7 @@ void IfcParse::IfcFile::load(unsigned entity_instance_name, const IfcParse::enti
load(entity_instance_name, entity, context.push(), attribute_index == -1 ? (int) attribute_index_within_data : attribute_index);
} else {
return_value++;
if (TokenFunc::isIdentifier(next)) {
if (TokenFunc::isIdentifier(next) && entity) {
register_inverse(entity_instance_name, entity, next, attribute_index == -1 ? attribute_index_within_data : attribute_index);
}