[postgis-tickets] r15325 - Add missing guard when libprotobuf-c is not available

bjorn at wololo.org bjorn at wololo.org
Fri Mar 10 12:17:33 PST 2017


Author: bjornharrtell
Date: 2017-03-10 12:17:32 -0800 (Fri, 10 Mar 2017)
New Revision: 15325

Modified:
   trunk/postgis/lwgeom_out_mvt.c
Log:
Add missing guard when libprotobuf-c is not available

Modified: trunk/postgis/lwgeom_out_mvt.c
===================================================================
--- trunk/postgis/lwgeom_out_mvt.c	2017-03-09 11:30:59 UTC (rev 15324)
+++ trunk/postgis/lwgeom_out_mvt.c	2017-03-10 20:17:32 UTC (rev 15325)
@@ -41,6 +41,10 @@
 PG_FUNCTION_INFO_V1(ST_AsMVTGeom);
 Datum ST_AsMVTGeom(PG_FUNCTION_ARGS)
 {
+#ifndef HAVE_LIBPROTOBUF
+	lwerror("Missing libprotobuf-c");
+	PG_RETURN_NULL();
+#else
 	LWGEOM *lwgeom_in, *lwgeom_out;
 	GSERIALIZED *geom_in, *geom_out;
 	GBOX *bounds;
@@ -62,6 +66,7 @@
 	lwgeom_free(lwgeom_out);
 	PG_FREE_IF_COPY(geom_in, 0);
 	PG_RETURN_POINTER(geom_out);
+#endif
 }
 
 /**



More information about the postgis-tickets mailing list