From 6c2ff5dac8b2447a16a3f2bf0e28fc0040eafbd4 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 29 Jun 2015 07:01:59 +0000 Subject: [PATCH] Handle error from WithinDistance2D liblwgeom-topo backend callbacks git-svn-id: http://svn.osgeo.org/postgis/trunk@13733 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwgeom_topo.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c index 75313f19f..2b7d5a46f 100644 --- a/liblwgeom/lwgeom_topo.c +++ b/liblwgeom/lwgeom_topo.c @@ -173,13 +173,17 @@ lwt_be_updateTopoGeomEdgeSplit(LWT_TOPOLOGY* topo, LWT_ELEMID split_edge, LWT_EL CBT3(topo, updateTopoGeomEdgeSplit, split_edge, new_edge1, new_edge2); } -/* wrappers of be wrappers... */ +/* wrappers of backend wrappers... */ int lwt_be_ExistsCoincidentNode(LWT_TOPOLOGY* topo, LWPOINT* pt) { int exists = 0; lwt_be_getNodeWithinDistance2D(topo, pt, 0, &exists, 0, -1); + if ( exists == -1 ) { + lwerror("Backend error: %s", lwt_be_lastErrorMessage(topo->be_iface)); + return 0; + } return exists; } @@ -188,6 +192,10 @@ lwt_be_ExistsEdgeIntersectingPoint(LWT_TOPOLOGY* topo, LWPOINT* pt) { int exists = 0; lwt_be_getEdgeWithinDistance2D(topo, pt, 0, &exists, 0, -1); + if ( exists == -1 ) { + lwerror("Backend error: %s", lwt_be_lastErrorMessage(topo->be_iface)); + return 0; + } return exists; } -- 2.40.0