]> granicus.if.org Git - postgis/commitdiff
Still bugfixes. Related to #665
authorOlivier Courtin <olivier.courtin@camptocamp.com>
Tue, 7 Feb 2012 21:30:36 +0000 (21:30 +0000)
committerOlivier Courtin <olivier.courtin@camptocamp.com>
Tue, 7 Feb 2012 21:30:36 +0000 (21:30 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9076 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/libtgeom.c

index 27cc1d39120be7a6c78963b1ec465337eca1ece1..aa8005c2a246d8437a8074773551e34ae8ad1160 100644 (file)
@@ -444,7 +444,7 @@ tgeom_from_lwgeom(const LWGEOM *lwgeom)
                        tgeom->type, lwtype_name(tgeom->type));
        }
 
-       if (lwgeom_is_empty(lwgeom)) return tgeom; /* empty is not a solid */
+       if (tgeom->nedges == 0) return tgeom; /* empty is not a solid */
 
        for (solid=1, i=1 ; i <= tgeom->nedges ; i++)
        {
@@ -889,7 +889,7 @@ tgeom_deserialize(TSERIALIZED *serialized_form)
                        loc  += 4;
 
                        /* pointarray */
-                       result->faces[i]->rings[j] = ptarray_construct_reference_data(FLAGS_GET_Z(flags), FLAGS_GET_M(flags), npoints, loc);
+                       result->faces[i]->rings[j] = ptarray_construct_copy_data(FLAGS_GET_Z(flags), FLAGS_GET_M(flags), npoints, loc);
                        
                        loc += sizeof(double)* FLAGS_NDIMS(flags) * npoints;
                }