forked from postgis/postgis
ST_LocateBetweenElevations: fix segfault on interrupt
parent
cb726d5cd6
commit
33b01e0177
|
@ -736,6 +736,9 @@ lwpoly_clip_to_ordinate_range(const LWPOLY *poly, char ordinate, double from, do
|
|||
/* Ret number of points */
|
||||
POINTARRAY *pa = ptarray_clamp_to_ordinate_range(poly->rings[i], ordinate, from, to, LW_TRUE);
|
||||
|
||||
if (!pa)
|
||||
return NULL;
|
||||
|
||||
if (pa->npoints >= 4)
|
||||
lwpoly_add_ring(poly_res, pa);
|
||||
else
|
||||
|
@ -764,6 +767,9 @@ lwtriangle_clip_to_ordinate_range(const LWTRIANGLE *tri, char ordinate, double f
|
|||
LWCOLLECTION *lwgeom_out = lwcollection_construct_empty(TINTYPE, tri->srid, hasz, hasm);
|
||||
POINTARRAY *pa = ptarray_clamp_to_ordinate_range(tri->points, ordinate, from, to, LW_TRUE);
|
||||
|
||||
if (!pa)
|
||||
return NULL;
|
||||
|
||||
if (pa->npoints >= 4)
|
||||
{
|
||||
POINT4D first = getPoint4d(pa, 0);
|
||||
|
|
Loading…
Reference in New Issue