[postgis-tickets] r14544 - Do not fill object fields when not requested

Sandro Santilli strk at keybit.net
Mon Jan 4 08:26:22 PST 2016


Author: strk
Date: 2016-01-04 08:26:22 -0800 (Mon, 04 Jan 2016)
New Revision: 14544

Modified:
   trunk/topology/postgis_topology.c
Log:
Do not fill object fields when not requested

Fixes #3416 (crash on topology load in debug build)

Modified: trunk/topology/postgis_topology.c
===================================================================
--- trunk/topology/postgis_topology.c	2016-01-04 16:24:59 UTC (rev 14543)
+++ trunk/topology/postgis_topology.c	2016-01-04 16:26:22 UTC (rev 14544)
@@ -630,11 +630,6 @@
     POSTGIS_DEBUGF(2, "fillEdgeFields: colno%d (face_left)"
                       " has int32 val of %d", colno, val);
   }
-#if POSTGIS_DEBUG_LEVEL > 1
-  else {
-    edge->face_left = 6767; /* debugging */
-  }
-#endif
   if ( fields & LWT_COL_EDGE_FACE_RIGHT ) {
     dat = SPI_getbinval(row, rowdesc, ++colno, &isnull);
     if ( isnull ) {
@@ -646,11 +641,6 @@
     POSTGIS_DEBUGF(2, "fillEdgeFields: colno%d (face_right)"
                       " has int32 val of %d", colno, val);
   }
-#if POSTGIS_DEBUG_LEVEL > 1
-  else {
-    edge->face_right = 6767; /* debugging */
-  }
-#endif
   if ( fields & LWT_COL_EDGE_NEXT_LEFT ) {
     dat = SPI_getbinval(row, rowdesc, ++colno, &isnull);
     if ( isnull ) {
@@ -683,11 +673,6 @@
       edge->geom = NULL;
     }
   }
-#if POSTGIS_DEBUG_LEVEL > 1
-  else {
-    edge->geom = (void*)0x67676767; /* debugging */
-  }
-#endif
 }
 
 static void
@@ -717,11 +702,6 @@
       node->geom = NULL;
     }
   }
-#if POSTGIS_DEBUG_LEVEL > 1
-  else {
-    node->geom = (void*)0x67676767; /* debugging */
-  }
-#endif
 }
 
 static void
@@ -757,11 +737,6 @@
       face->mbr = NULL;
     }
   }
-#if POSTGIS_DEBUG_LEVEL > 1
-  else {
-    face->mbr = (void*)0x67676767; /* debugging */
-  }
-#endif
 }
 
 /* return 0 on failure (null) 1 otherwise */



More information about the postgis-tickets mailing list