]> granicus.if.org Git - postgis/commitdiff
Reorder to C order
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 20 Mar 2015 15:43:43 +0000 (15:43 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 20 Mar 2015 15:43:43 +0000 (15:43 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13374 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/gserialized_typmod.c

index a9903d9f06f1e5da72acee13fcbe6293a25e480d..7adaafeefe659725f6e008e49b056495716b676f 100644 (file)
@@ -133,9 +133,9 @@ GSERIALIZED* postgis_valid_typmod(GSERIALIZED *gser, int32_t typmod)
        if ( typmod_type == POINTTYPE && geom_type == MULTIPOINTTYPE && 
             gserialized_is_empty(gser) )
        {
-               pfree(gser);
                LWPOINT *empty_point = lwpoint_construct_empty(geom_srid, geom_z, geom_m);
                geom_type = POINTTYPE;
+               pfree(gser);
                if ( gserialized_is_geodetic(gser) )
                        gser = geography_serialize(lwpoint_as_lwgeom(empty_point));
                else