mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
schema nullptr dereference
This commit is contained in:
+12
-10
@@ -1944,17 +1944,19 @@ void ifcopenshell::instance_streamer<Reader>::initialize_header() {
|
|||||||
|
|
||||||
storage_.schema = schema_;
|
storage_.schema = schema_;
|
||||||
|
|
||||||
types_to_bypass_materialized_.resize(schema_->declarations().size(), false);
|
if (schema_) {
|
||||||
for (auto& bp : types_to_bypass_) {
|
types_to_bypass_materialized_.resize(schema_->declarations().size(), false);
|
||||||
std::function<void(const ifcopenshell::entity*)> mark;
|
for (auto& bp : types_to_bypass_) {
|
||||||
mark = [&](const ifcopenshell::entity* e) {
|
std::function<void(const ifcopenshell::entity*)> mark;
|
||||||
types_to_bypass_materialized_[e->index_in_schema()] = true;
|
mark = [&](const ifcopenshell::entity* e) {
|
||||||
for (auto& subtype : e->subtypes()) {
|
types_to_bypass_materialized_[e->index_in_schema()] = true;
|
||||||
mark(subtype);
|
for (auto& subtype : e->subtypes()) {
|
||||||
|
mark(subtype);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (auto* e = bp->as_entity()) {
|
||||||
|
mark(e);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
if (auto* e = bp->as_entity()) {
|
|
||||||
mark(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user