Skip to content

Commit 58e0fcd

Browse files
authored
Merge pull request duckdb#390 from Maxxen/dev
check version on type too
2 parents 662cd19 + 3ee7d1e commit 58e0fcd

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)