[SCM] PostGIS branch stable-3.6 updated. 3.6.1-17-gd063e2a19

git at osgeo.org git at osgeo.org
Mon Jan 26 12:38:44 PST 2026


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, stable-3.6 has been updated
       via  d063e2a19fa045818bdc226ec8da6dbf155d6310 (commit)
      from  ba50bdfaa929b9bef44024a941fdf2472b10e9d6 (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 d063e2a19fa045818bdc226ec8da6dbf155d6310
Author: Maksim Korotkov <m.korotkov at postgrespro.ru>
Date:   Mon Jan 26 17:41:52 2026 +0300

    Replace check for avoiding NULL dereference
    
    Fixes: 9726c4770 ("missed file commit for ST_Centroid Geography support references #2951")
    
    Signed-off-by: Maksim Korotkov <m.korotkov at postgrespro.ru>

diff --git a/postgis/geography_centroid.c b/postgis/geography_centroid.c
index 386e029ba..8a4881671 100644
--- a/postgis/geography_centroid.c
+++ b/postgis/geography_centroid.c
@@ -63,13 +63,13 @@ Datum geography_centroid(PG_FUNCTION_ARGS)
 
 	/* Get our geometry object loaded into memory. */
 	g = PG_GETARG_GSERIALIZED_P(0);
-	lwgeom = lwgeom_from_gserialized(g);
 
 	if (g == NULL)
 	{
 		PG_RETURN_NULL();
 	}
 
+    lwgeom = lwgeom_from_gserialized(g);
 	srid = lwgeom_get_srid(lwgeom);
 
 	/* on empty input, return empty output */

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

Summary of changes:
 postgis/geography_centroid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list