From: Sandro Santilli Date: Thu, 8 Sep 2016 15:52:59 +0000 (+0000) Subject: Fix callback reading Edge data in presence of unexpected NULLs X-Git-Tag: 2.3.0rc1~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eac70fc0bc0fe98e13903946c11b5e151578fcf0;p=postgis 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 --- 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;