[mapserver-commits] r8878 - branches/branch-5-4/mapserver

svn at osgeo.org svn at osgeo.org
Fri Apr 3 18:20:05 EDT 2009


Author: assefa
Date: 2009-04-03 18:20:05 -0400 (Fri, 03 Apr 2009)
New Revision: 8878

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/mapswf.c
Log:
SWF: test missing when creating EllipseButtons (#2966)

Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-04-03 13:40:41 UTC (rev 8877)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-04-03 22:20:05 UTC (rev 8878)
@@ -15,6 +15,8 @@
 Version 5.4.0-beta4 (2009-04-01):
 ---------------------------------
 
+- SWF: test missing when creating EllipseButtons (#2966)
+
 - clean up GEOS init and cleanup functions (#2929) 
 
 - Made sure computation of default symbol size is consistent will older versions (#2963)

Modified: branches/branch-5-4/mapserver/mapswf.c
===================================================================
--- branches/branch-5-4/mapserver/mapswf.c	2009-04-03 13:40:41 UTC (rev 8877)
+++ branches/branch-5-4/mapserver/mapswf.c	2009-04-03 22:20:05 UTC (rev 8878)
@@ -1659,12 +1659,15 @@
                                      psFillColor, psOutlineColor,
                                      &sColorHighlightObj,
                                      nLayerIndex, nShapeIndex, image);
-		/* Ticket #2555 memory leak : need to store buttons to properly destroy them */
-                StoreButton(oButton, image);
-                oDisplay = _msSWFAddButtonWithId(image,
-                                                 GetCurrentMovie(map, image),
-                                                 oButton, 
-                                                 nLayerIndex, nShapeIndex);
+                if (oButton)
+                {
+                  /* Ticket #2555 memory leak : need to store buttons to properly destroy them */
+                  StoreButton(oButton, image);
+                  oDisplay = _msSWFAddButtonWithId(image,
+                                                   GetCurrentMovie(map, image),
+                                                   oButton, 
+                                                   nLayerIndex, nShapeIndex);
+                }
             
             } 
             else 
@@ -1678,11 +1681,14 @@
                                            psFillColor, NULL, 
                                            &sColorHighlightObj,
                                            nLayerIndex, nShapeIndex, image);
-		    StoreButton(oButton, image);
-                    oDisplay = _msSWFAddButtonWithId(image,
-                                                     GetCurrentMovie(map, image),
-                                                     oButton, 
-                                                     nLayerIndex, nShapeIndex);
+                    if (oButton)
+                    {
+                      StoreButton(oButton, image);
+                      oDisplay = _msSWFAddButtonWithId(image,
+                                                       GetCurrentMovie(map, image),
+                                                       oButton, 
+                                                       nLayerIndex, nShapeIndex);
+                    }
                 }
             }
             break;



More information about the mapserver-commits mailing list