]> granicus.if.org Git - postgis/commitdiff
Fix callback reading Edge data in presence of unexpected NULLs
authorSandro Santilli <strk@kbt.io>
Thu, 8 Sep 2016 15:52:59 +0000 (15:52 +0000)
committerSandro Santilli <strk@kbt.io>
Thu, 8 Sep 2016 15:52:59 +0000 (15:52 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@15083 b70326c6-7e19-0410-871a-916f4a2858ee

topology/postgis_topology.c

index 2e73530ba6d0a59e9295894c971a958afaa6c7dc..3966af3357e6583f23a9d3827c277c0f490e8237 100644 (file)
@@ -627,7 +627,7 @@ fillEdgeFields(LWT_ISO_EDGE* edge, HeapTuple row, TupleDesc rowdesc, int fields)
     dat = SPI_getbinval(row, rowdesc, ++colno, &isnull);
     if ( isnull ) {
       lwpgwarning("Found edge with NULL end_node");
-      edge->start_node = -1;
+      edge->end_node = -1;
     }
     val = DatumGetInt32(dat);
     edge->end_node = val;
@@ -638,7 +638,7 @@ fillEdgeFields(LWT_ISO_EDGE* edge, HeapTuple row, TupleDesc rowdesc, int fields)
     dat = SPI_getbinval(row, rowdesc, ++colno, &isnull);
     if ( isnull ) {
       lwpgwarning("Found edge with NULL face_left");
-      edge->start_node = -1;
+      edge->face_left = -1;
     }
     val = DatumGetInt32(dat);
     edge->face_left = val;
@@ -649,7 +649,7 @@ fillEdgeFields(LWT_ISO_EDGE* edge, HeapTuple row, TupleDesc rowdesc, int fields)
     dat = SPI_getbinval(row, rowdesc, ++colno, &isnull);
     if ( isnull ) {
       lwpgwarning("Found edge with NULL face_right");
-      edge->start_node = -1;
+      edge->face_right = -1;
     }
     val = DatumGetInt32(dat);
     edge->face_right = val;
@@ -660,7 +660,7 @@ fillEdgeFields(LWT_ISO_EDGE* edge, HeapTuple row, TupleDesc rowdesc, int fields)
     dat = SPI_getbinval(row, rowdesc, ++colno, &isnull);
     if ( isnull ) {
       lwpgwarning("Found edge with NULL next_left");
-      edge->start_node = -1;
+      edge->next_left = -1;
     }
     val = DatumGetInt32(dat);
     edge->next_left = val;
@@ -671,7 +671,7 @@ fillEdgeFields(LWT_ISO_EDGE* edge, HeapTuple row, TupleDesc rowdesc, int fields)
     dat = SPI_getbinval(row, rowdesc, ++colno, &isnull);
     if ( isnull ) {
       lwpgwarning("Found edge with NULL next_right");
-      edge->start_node = -1;
+      edge->next_right = -1;
     }
     val = DatumGetInt32(dat);
     edge->next_right = val;