From eac70fc0bc0fe98e13903946c11b5e151578fcf0 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 8 Sep 2016 15:52:59 +0000 Subject: [PATCH] Fix callback reading Edge data in presence of unexpected NULLs git-svn-id: http://svn.osgeo.org/postgis/trunk@15083 b70326c6-7e19-0410-871a-916f4a2858ee --- topology/postgis_topology.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/topology/postgis_topology.c b/topology/postgis_topology.c index 2e73530ba..3966af335 100644 --- a/topology/postgis_topology.c +++ b/topology/postgis_topology.c @@ -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; -- 2.40.0