[mapserver-commits] r8518 - in trunk/mapserver: . mapscript/swiginc

svn at osgeo.org svn at osgeo.org
Sun Feb 8 18:43:40 EST 2009


Author: tamas
Date: 2009-02-08 18:43:39 -0500 (Sun, 08 Feb 2009)
New Revision: 8518

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapscript/swiginc/label.i
   trunk/mapserver/mapscript/swiginc/style.i
Log:
Fixed the problem when removing the attribute binding in mapscript.

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-02-07 20:02:23 UTC (rev 8517)
+++ trunk/mapserver/HISTORY.TXT	2009-02-08 23:43:39 UTC (rev 8518)
@@ -12,6 +12,8 @@
 Current Version (5.3-dev, SVN trunk):
 ------------------------------------
 
+- Fixed the problem when removing the attribute binding in mapscript.
+
 - SOS XML validity fixes (#2646)
 
 - add WFS calls for schema resolution (#2646)

Modified: trunk/mapserver/mapscript/swiginc/label.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/label.i	2009-02-07 20:02:23 UTC (rev 8517)
+++ trunk/mapserver/mapscript/swiginc/label.i	2009-02-08 23:43:39 UTC (rev 8518)
@@ -41,6 +41,7 @@
 
     if(self->bindings[binding].item) {
       free(self->bindings[binding].item);
+      self->bindings[binding].item = NULL;
       self->bindings[binding].index = -1; 
       self->numbindings--;
     }
@@ -61,7 +62,8 @@
     if(binding < 0 || binding >= MS_LABEL_BINDING_LENGTH) return MS_FAILURE;
 
     if(self->bindings[binding].item) {
-      free(self->bindings[binding].item); 
+      free(self->bindings[binding].item);
+      self->bindings[binding].item = NULL; 
       self->bindings[binding].index = -1;
       self->numbindings--;
     }

Modified: trunk/mapserver/mapscript/swiginc/style.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/style.i	2009-02-07 20:02:23 UTC (rev 8517)
+++ trunk/mapserver/mapscript/swiginc/style.i	2009-02-08 23:43:39 UTC (rev 8518)
@@ -130,6 +130,7 @@
 
     if(self->bindings[binding].item) {
       free(self->bindings[binding].item);
+      self->bindings[binding].index = NULL;
       self->bindings[binding].index = -1;
       self->numbindings--;
     }
@@ -144,6 +145,7 @@
 
     if(self->bindings[binding].item) {
       free(self->bindings[binding].item);
+      self->bindings[binding].index = NULL;
       self->bindings[binding].index = -1;
       self->numbindings--;
     }



More information about the mapserver-commits mailing list