mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Initialize the attributes of IfcLateBoundEntity to NULL upon construction.
Make sure IfcWritableEntity does not return null pointers, since getArgumentCount() is unreliable for instances being created from keyword arguments in Python.
This commit is contained in:
@@ -48,6 +48,10 @@ IfcParse::IfcLateBoundEntity::IfcLateBoundEntity(const std::string& s) {
|
||||
for (std::string::iterator i = S.begin(); i != S.end(); ++i ) *i = toupper(*i);
|
||||
_type = IfcSchema::Type::FromString(S);
|
||||
entity = new IfcWrite::IfcWritableEntity(_type);
|
||||
for (unsigned i = 0; i < getArgumentCount(); ++i) {
|
||||
// Side effect of this is that a NULL attribute is created.
|
||||
entity->getArgument(i);
|
||||
}
|
||||
IfcSchema::Type::PopulateDerivedFields(writable_entity());
|
||||
}
|
||||
IfcParse::IfcLateBoundEntity::IfcLateBoundEntity(IfcAbstractEntity* e) {
|
||||
|
||||
Reference in New Issue
Block a user