IfcConvert segfaults #12

This commit is contained in:
Thomas Krijnen
2014-07-02 11:53:03 +02:00
parent 99d83fce42
commit 31ca1ac1b5
+1 -2
View File
@@ -692,8 +692,7 @@ void IfcGeomObjects::InitUnits() {
unit = (IfcSchema::IfcSIUnit*) u3;
}
IfcSchema::IfcValue v = u2->ValueComponent();
IfcUtil::IfcArgumentSelect* v2 = (IfcUtil::IfcArgumentSelect*) v;
const double f = *v2->wrappedValue();
const double f = *((IfcUtil::IfcBaseEntity*)v)->entity->getArgument(0);
value *= f;
} else if ( base->is(IfcSchema::Type::IfcSIUnit) ) {
unit = reinterpret_pointer_cast<IfcUtil::IfcAbstractSelect,IfcSchema::IfcSIUnit>(base);