]> granicus.if.org Git - postgis/commitdiff
GBOX variables not initialized for empty geometries. Ticket #2257
authorBborie Park <bkpark at ucdavis.edu>
Sat, 6 Apr 2013 18:11:13 +0000 (18:11 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Sat, 6 Apr 2013 18:11:13 +0000 (18:11 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11256 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
postgis/lwgeom_btree.c

diff --git a/NEWS b/NEWS
index b78279ae53ec18526dd3429c8d4a31bdd0c58bbd..f43e3e40e2d31c2665ba1339feae667ecad980f0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -164,6 +164,7 @@ PostGIS 2.1.0
   - #2251, Fix bad dimensions when rescaling rasters with default
            geotransform matrix
   - #2133, Fix performance regression in expression variant of ST_MapAlgebra
+  - #2257, GBOX variables not initialized when testing with empty geometries
 
 PostGIS 2.0.3
 2013/03/01
index 35373208256c2c24183c11f12695b8ad17d29a57..3954bba4e06e6dd9ba36d65115a46fa2dc2f288a 100644 (file)
@@ -182,10 +182,16 @@ Datum lwgeom_eq(PG_FUNCTION_ARGS)
                PG_RETURN_NULL();
        }
 
+       gbox_init(&box1);
+       gbox_init(&box2);
+       
        empty1 = ( gserialized_get_gbox_p(geom1, &box1) == LW_FAILURE );
        empty2 = ( gserialized_get_gbox_p(geom2, &box2) == LW_FAILURE );
        PG_FREE_IF_COPY(geom1, 0);
        PG_FREE_IF_COPY(geom2, 1);
+       POSTGIS_DEBUGF(3, "empty1, empty2 = %d, %d", empty1, empty2);
+       POSTGIS_DEBUGF(4, "%f ~ %f, %f ~ %f, %f ~ %f, %f ~ %f",
+               box1.xmin, box2.xmin, box1.ymin, box2.ymin, box1.xmax, box2.xmax, box1.ymax, box2.ymax);
 
        if  ( empty1 != empty2 ) 
        {