From: Bborie Park Date: Sat, 6 Apr 2013 18:11:13 +0000 (+0000) Subject: GBOX variables not initialized for empty geometries. Ticket #2257 X-Git-Tag: 2.1.0beta2~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f66424005f4a3f419bad164b78e19258c5c04e9;p=postgis GBOX variables not initialized for empty geometries. Ticket #2257 git-svn-id: http://svn.osgeo.org/postgis/trunk@11256 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/NEWS b/NEWS index b78279ae5..f43e3e40e 100644 --- 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 diff --git a/postgis/lwgeom_btree.c b/postgis/lwgeom_btree.c index 353732082..3954bba4e 100644 --- a/postgis/lwgeom_btree.c +++ b/postgis/lwgeom_btree.c @@ -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 ) {