From 422d3b89d1dd316e0cf7eb00dad8508c20289b41 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Sat, 20 Jun 2009 22:13:48 +0000 Subject: [PATCH] Gracefully handle typed empty GEOS geometries. git-svn-id: http://svn.osgeo.org/postgis/trunk@4189 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/lwgeom_geos.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index 21ea05ca1..4aa25fc45 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -2450,6 +2450,11 @@ GEOS2LWGEOM(const GEOSGeometry *geom, char want3d) } } + if ( GEOSisEmpty(geom) ) + { + return (LWGEOM*)lwcollection_construct_empty(SRID, want3d, 0); + } + switch (type) { const GEOSCoordSequence *cs; -- 2.40.0