HdfSerializer::read - fix nullptr dereference reading surface styles

The problem was with the line `read_surface_style(surface_styles[i], surface_style_ptrs[i]);` since `surface_style_ptrs[i]` was a nullptr.

Changed the signature to `style&` to make it more clear that it's expecting already created style struct.
This commit is contained in:
Andrej730
2025-08-07 20:24:13 +05:00
parent 67d405ba76
commit 4b7dfcdae5
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ private:
std::map<std::string, std::string> group_cache_;
H5::Group createRepresentationGroup(const H5::Group& element_group, const std::string& gid);
void read_surface_style(surface_style_serialization& sss, const ifcopenshell::geometry::taxonomy::style::ptr& style_ptr);
void read_surface_style(surface_style_serialization& serialized_style, ifcopenshell::geometry::taxonomy::style& style);
void write_style(surface_style_serialization& data, const ifcopenshell::geometry::taxonomy::style::ptr& s);
public: