From: Sandro Santilli Date: Sat, 20 Jun 2009 22:13:48 +0000 (+0000) Subject: Gracefully handle typed empty GEOS geometries. X-Git-Tag: 1.4.0rc1~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=422d3b89d1dd316e0cf7eb00dad8508c20289b41;p=postgis Gracefully handle typed empty GEOS geometries. git-svn-id: http://svn.osgeo.org/postgis/trunk@4189 b70326c6-7e19-0410-871a-916f4a2858ee --- 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;