Correct setting attributes on lazily loaded instances

This commit is contained in:
Thomas Krijnen
2017-06-15 14:12:03 +02:00
parent 48a61219f7
commit c25cff6bad
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -1008,6 +1008,10 @@ Argument* IfcEntityInstanceData::getArgument(unsigned int i) const {
}
void IfcEntityInstanceData::setArgument(unsigned int i, Argument* a, IfcUtil::ArgumentType attr_type) {
if (!initialized_) {
load_();
}
while (attributes_.size() < i) {
attributes_.push_back(new NullArgument());
}