[postgis-devel] [PostGIS] #254: ST_Segmentize crashes with empty geometry collections
PostGIS
trac at osgeo.org
Tue Sep 29 06:24:34 PDT 2009
#254: ST_Segmentize crashes with empty geometry collections
----------------------+-----------------------------------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: postgis 1.4.1
Component: postgis | Version: trunk
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by strk):
Try this:
Index: liblwgeom/lwcollection.c
===================================================================
--- liblwgeom/lwcollection.c (revision 4541)
+++ liblwgeom/lwcollection.c (working copy)
@@ -321,7 +321,7 @@
unsigned int i;
LWGEOM **newgeoms;
- if ( ! col->ngeoms ) return col;
+ if ( ! col->ngeoms ) return lwcollection_clone(col);
newgeoms = lwalloc(sizeof(LWGEOM *)*col->ngeoms);
for (i=0; i<col->ngeoms; i++)
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/254#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list