]> granicus.if.org Git - postgis/commitdiff
Pull prep_cache reference safely inside PREPARED_GEOM #ifdef
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 10 Oct 2008 16:34:24 +0000 (16:34 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 10 Oct 2008 16:34:24 +0000 (16:34 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3089 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_geos.c

index 5e2af5b90d57700ee6738ed9e8d95dc6119f0c5e..95d188ac896512efb1518995263a0fe9458437ab 100644 (file)
@@ -1628,9 +1628,9 @@ Datum covers(PG_FUNCTION_ARGS)
 
        initGEOS(lwnotice, lwnotice);
 
+#ifdef PREPARED_GEOM
        prep_cache = GetPrepGeomCache( fcinfo, geom1, 0 );
 
-#ifdef PREPARED_GEOM
        if ( prep_cache && prep_cache->prepared_geom && prep_cache->argnum == 1 )
        {
                GEOSGeom g1 = POSTGIS2GEOS(geom2);