[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0beta1-59-g0abe88bb8
git at osgeo.org
git at osgeo.org
Mon Jul 24 10:16:49 PDT 2023
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, master has been updated
via 0abe88bb886a7f503873cecbf4ef067a0bbd9505 (commit)
from b9b24f9b153884f2cc4df7e86765912d59470206 (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 0abe88bb886a7f503873cecbf4ef067a0bbd9505
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Jul 24 10:16:44 2023 -0700
Check return pointer before setting it. Closes #5456
diff --git a/liblwgeom/lwgeodetic_measures.c b/liblwgeom/lwgeodetic_measures.c
index d8e245657..e1fad3a7f 100644
--- a/liblwgeom/lwgeodetic_measures.c
+++ b/liblwgeom/lwgeodetic_measures.c
@@ -397,18 +397,20 @@ ptarray_locate_point_spheroid(
/* Handle point/point case here */
if ( pa->npoints <= 1)
{
+ double mindist = 0.0;
if ( pa->npoints == 1 )
{
p = getPoint2d_cp(pa, 0);
geographic_point_init(p->x, p->y, &b);
/* Sphere special case, axes equal */
- *mindistout = s->radius * sphere_distance(&a, &b);
+ mindist = s->radius * sphere_distance(&a, &b);
/* If close or greater than tolerance, get the real answer to be sure */
- if ( ! use_sphere || *mindistout > 0.95 * tolerance )
+ if ( ! use_sphere || mindist > 0.95 * tolerance )
{
- *mindistout = spheroid_distance(&a, &b, s);
+ mindist = spheroid_distance(&a, &b, s);
}
}
+ if ( mindistout ) *mindistout = mindist;
return 0.0;
}
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/lwgeodetic_measures.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list