]> granicus.if.org Git - postgis/commitdiff
Fix build with debugging on, fix bug when run against invalid linestrings
authorSandro Santilli <strk@keybit.net>
Sun, 28 Feb 2010 22:24:18 +0000 (22:24 +0000)
committerSandro Santilli <strk@keybit.net>
Sun, 28 Feb 2010 22:24:18 +0000 (22:24 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5358 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_geos_clean.c

index cc316906be763576bee0e4ce8d3a185da38d15bf..46fdc3599ceb1b8be11110dff21de2945ed83047 100644 (file)
 #include <string.h>
 #include <assert.h>
 
-#if POSTGIS_GEOS_VERSION >= 32
-#endif
-
-/* #define POSTGIS_DEBUG_LEVEL 0 */
+/* #define POSTGIS_DEBUG_LEVEL 4 */
 
 
 #define BUFSIZE 256
@@ -736,14 +733,13 @@ lwgeom_make_valid(LWGEOM* lwgeom_in)
        POSTGIS_DEBUGF(3,
                       "Geometry [%s] is still not valid: %s. "
                       "Will try to clean up further.",
-                      lwgeom_to_ewkt(GEOS2LWGEOM(lwgeom_out, 0),
+                      lwgeom_to_ewkt(GEOS2LWGEOM(geosgeom, 0),
                        PARSER_CHECK_NONE), loggederror);
 
 
        geosout = LWGEOM_GEOS_makeValid(geosgeom);
        GEOSGeom_destroy(geosgeom);
        if ( ! geosout ) {
-               GEOSGeom_destroy(geosgeom);
                return NULL;
        }