]> granicus.if.org Git - postgis/commitdiff
Remove crash for case when all geographies are on the outer edges of the histobox...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 18 May 2010 17:43:09 +0000 (17:43 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 18 May 2010 17:43:09 +0000 (17:43 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5625 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_estimate.c

index ab0bc76b4f3a41843643e0ebc9739e68f95a5bb0..d09334a340a5e367ddafa5fd349a0a032c7281d5 100644 (file)
@@ -1041,6 +1041,13 @@ compute_geography_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
                }
        }
 
+       /* If everything was a deviant, the new histobox is the same as the old histobox */
+       if ( ! newhistobox )
+       {
+               newhistobox = palloc(sizeof(GBOX));
+               memcpy(newhistobox, &histobox, sizeof(GBOX));
+       }
+
        /*
         * Set histogram extent as the intersection between
         * standard deviation based histogram extent