[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-369-gd3f1c2b

git at osgeo.org git at osgeo.org
Wed Jul 28 14:34:54 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, main has been updated
       via  d3f1c2b53deb2adc01c254d14f2c320e51fb6cc8 (commit)
      from  6230cdfe6800b56bb1011f9ab904bd06b7079f47 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d3f1c2b53deb2adc01c254d14f2c320e51fb6cc8
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jul 28 14:34:51 2021 -0700

    Add guard to return pointer, closes #4953

diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c
index f847bb4..82e6c15 100644
--- a/liblwgeom/lwgeodetic.c
+++ b/liblwgeom/lwgeodetic.c
@@ -1224,7 +1224,9 @@ double edge_distance_to_point(const GEOGRAPHIC_EDGE *e, const GEOGRAPHIC_POINT *
 	/* Zero length edge, */
 	if ( geographic_point_equals(&(e->start), &(e->end)) )
 	{
-		*closest = e->start;
+		if (closest)
+			*closest = e->start;
+
 		return sphere_distance(&(e->start), gp);
 	}
 

-----------------------------------------------------------------------

Summary of changes:
 liblwgeom/lwgeodetic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list