Skip to content

Commit 3ee7d1e

Browse files
committed
check version on type too
1 parent b74def2 commit 3ee7d1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spatial/include/spatial/core/geometry/geometry_type.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ class geometry_t {
8484

8585
GeometryType GetType() const {
8686
// return the type
87-
return Load<GeometryType>(const_data_ptr_cast(data.GetPrefix()));
87+
const auto type = Load<GeometryType>(const_data_ptr_cast(data.GetPrefix()));
88+
const auto props = Load<GeometryProperties>(const_data_ptr_cast(data.GetPrefix() + 1));
89+
props.CheckVersion();
90+
return type;
8891
}
8992

9093
GeometryProperties GetProperties() const {

0 commit comments

Comments
 (0)