From: Björn Harrtell Date: Fri, 10 Mar 2017 20:17:32 +0000 (+0000) Subject: Add missing guard when libprotobuf-c is not available X-Git-Tag: 2.4.0alpha~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=210b45e1e90ee0508ae8f3b7b6b87cc11a6e88ef;p=postgis Add missing guard when libprotobuf-c is not available git-svn-id: http://svn.osgeo.org/postgis/trunk@15325 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/lwgeom_out_mvt.c b/postgis/lwgeom_out_mvt.c index f97da9815..b797773c8 100644 --- a/postgis/lwgeom_out_mvt.c +++ b/postgis/lwgeom_out_mvt.c @@ -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 @@ Datum ST_AsMVTGeom(PG_FUNCTION_ARGS) lwgeom_free(lwgeom_out); PG_FREE_IF_COPY(geom_in, 0); PG_RETURN_POINTER(geom_out); +#endif } /**