]> granicus.if.org Git - postgis/commitdiff
Add missing guard when libprotobuf-c is not available
authorBjörn Harrtell <bjorn@wololo.org>
Fri, 10 Mar 2017 20:17:32 +0000 (20:17 +0000)
committerBjörn Harrtell <bjorn@wololo.org>
Fri, 10 Mar 2017 20:17:32 +0000 (20:17 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@15325 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_out_mvt.c

index f97da9815dfbd3a25d01f73b363e679c81518bef..b797773c83f466f3e02bbeda480b02be94585a61 100644 (file)
 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
 }
 
 /**