diff --git a/src/geoarrow/metadata.c b/src/geoarrow/metadata.c index 2afa470..536767c 100644 --- a/src/geoarrow/metadata.c +++ b/src/geoarrow/metadata.c @@ -552,7 +552,7 @@ int64_t GeoArrowUnescapeCrs(struct GeoArrowStringView crs, char* out, int64_t n) if (n > crs.size_bytes) { memcpy(out, crs.data, crs.size_bytes); out[crs.size_bytes] = '\0'; - } else { + } else if (out != NULL) { memcpy(out, crs.data, n); }