[mapserver-commits] r10963 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Feb 7 12:05:57 EST 2011


Author: dmorissette
Date: 2011-02-07 09:05:57 -0800 (Mon, 07 Feb 2011)
New Revision: 10963

Modified:
   trunk/mapserver/mapogr.cpp
Log:
Fixed possible seg. fault when using OGR:Label* special attributes (#3667)

Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp	2011-02-07 17:05:25 UTC (rev 10962)
+++ trunk/mapserver/mapogr.cpp	2011-02-07 17:05:57 UTC (rev 10963)
@@ -599,7 +599,10 @@
             if (hStylePart && OGR_ST_GetType(hStylePart) == OGRSTCLabel)
                 hLabelStyle = hStylePart;
             else if (hStylePart)
+            {
                 OGR_ST_Destroy(hStylePart);
+                hStylePart =  NULL;
+            }
 
           /* Setting up the size units according to msOGRLayerGetAutoStyle*/
           if (hStylePart && layer->map)
@@ -897,7 +900,10 @@
         if (poStylePart && poStylePart->GetType() == OGRSTCLabel)
             poLabelStyle = (OGRStyleLabel*)poStylePart;
         else if (poStylePart)
+        {
             delete poStylePart;
+            poStylePart = NULL;
+        }
         /* Setting up the size units according to msOGRLayerGetAutoStyle*/
         if (poStylePart && layer->map)
             poStylePart->SetUnit(OGRSTUPixel, layer->map->cellsize*72.0*39.37);



More information about the mapserver-commits mailing list