mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
Fix iterator::get() invalid cast on nullptr
This commit is contained in:
@@ -1038,7 +1038,7 @@ namespace IfcGeom {
|
|||||||
ifc_product = ifc_entity->as<IfcSchema::IfcProduct>();
|
ifc_product = ifc_entity->as<IfcSchema::IfcProduct>();
|
||||||
parent_id = -1;
|
parent_id = -1;
|
||||||
try {
|
try {
|
||||||
IfcSchema::IfcObjectDefinition* parent_object = kernel.get_decomposing_entity(ifc_product)->template as<IfcSchema::IfcObjectDefinition>();
|
auto parent_object = kernel.get_decomposing_entity(ifc_product);
|
||||||
if (parent_object) {
|
if (parent_object) {
|
||||||
parent_id = parent_object->data().id();
|
parent_id = parent_object->data().id();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user