Skip to content

Commit 31ca1ac

Browse files
committed
IfcConvert segfaults IfcOpenShell#12
1 parent 99d83fc commit 31ca1ac

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/ifcgeom/IfcGeomObjects.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,7 @@ void IfcGeomObjects::InitUnits() {
692692
unit = (IfcSchema::IfcSIUnit*) u3;
693693
}
694694
IfcSchema::IfcValue v = u2->ValueComponent();
695-
IfcUtil::IfcArgumentSelect* v2 = (IfcUtil::IfcArgumentSelect*) v;
696-
const double f = *v2->wrappedValue();
695+
const double f = *((IfcUtil::IfcBaseEntity*)v)->entity->getArgument(0);
697696
value *= f;
698697
} else if ( base->is(IfcSchema::Type::IfcSIUnit) ) {
699698
unit = reinterpret_pointer_cast<IfcUtil::IfcAbstractSelect,IfcSchema::IfcSIUnit>(base);

0 commit comments

Comments
 (0)