mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 02:29:58 +00:00
Fixes after 698c708bf6
This commit is contained in:
@@ -748,6 +748,8 @@ size_t IfcParse::IfcFile::load(unsigned entity_instance_name, const IfcParse::en
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vector) {
|
if (vector) {
|
||||||
|
// Obviously don't try and create a 0-length array.
|
||||||
|
if (num_attributes || vector->size()) {
|
||||||
// @todo figure out whether all this logic is still necessary, since we know the
|
// @todo figure out whether all this logic is still necessary, since we know the
|
||||||
// expected amount of attributes and shouldn't be able to access more than allowed
|
// expected amount of attributes and shouldn't be able to access more than allowed
|
||||||
// by the schema.
|
// by the schema.
|
||||||
@@ -761,6 +763,7 @@ size_t IfcParse::IfcFile::load(unsigned entity_instance_name, const IfcParse::en
|
|||||||
for (size_t i = 0; i < vector->size(); ++i) {
|
for (size_t i = 0; i < vector->size(); ++i) {
|
||||||
attributes[i] = vector->at(i);
|
attributes[i] = vector->at(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((vector != &internal_attribute_vector_) && (vector != &internal_attribute_vector_simple_type_)) {
|
if ((vector != &internal_attribute_vector_) && (vector != &internal_attribute_vector_simple_type_)) {
|
||||||
delete vector;
|
delete vector;
|
||||||
|
|||||||
Reference in New Issue
Block a user