From 3ee7d1e6fd2973b53fcb823047f11555b88a2d82 Mon Sep 17 00:00:00 2001 From: Max Gabrielsson Date: Fri, 6 Sep 2024 18:37:51 +0200 Subject: [PATCH] check version on type too --- spatial/include/spatial/core/geometry/geometry_type.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spatial/include/spatial/core/geometry/geometry_type.hpp b/spatial/include/spatial/core/geometry/geometry_type.hpp index 2a13c629..377ccd32 100644 --- a/spatial/include/spatial/core/geometry/geometry_type.hpp +++ b/spatial/include/spatial/core/geometry/geometry_type.hpp @@ -84,7 +84,10 @@ class geometry_t { GeometryType GetType() const { // return the type - return Load(const_data_ptr_cast(data.GetPrefix())); + const auto type = Load(const_data_ptr_cast(data.GetPrefix())); + const auto props = Load(const_data_ptr_cast(data.GetPrefix() + 1)); + props.CheckVersion(); + return type; } GeometryProperties GetProperties() const {