Index: libgimp/gimpbrushselectbutton.c
===================================================================
RCS file: /cvs/gnome/gimp/libgimp/gimpbrushselectbutton.c,v
retrieving revision 1.3
diff -u -p -r1.3 gimpbrushselectbutton.c
--- libgimp/gimpbrushselectbutton.c	5 Jul 2006 14:13:20 -0000	1.3
+++ libgimp/gimpbrushselectbutton.c	5 Jan 2007 15:10:21 -0000
@@ -288,6 +288,9 @@ gimp_brush_select_button_init (GimpBrush
                          &color_data_size,
                          &color_data);
 
+  if (color_data)
+    g_free (color_data);
+
   priv->inside = gimp_brush_select_button_create_inside (button);
   gtk_container_add (GTK_CONTAINER (button), priv->inside);
 
@@ -488,6 +491,9 @@ gimp_brush_select_button_set_property (G
 {
   GimpBrushSelectButton        *button = GIMP_BRUSH_SELECT_BUTTON (object);
   GimpBrushSelectButtonPrivate *priv;
+  gdouble opacity;
+  gint32 spacing;
+  gint32 paint_mode;
 
   priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
 
@@ -502,13 +508,19 @@ gimp_brush_select_button_set_property (G
                                           -1.0, -1, -1);
       break;
     case PROP_BRUSH_OPACITY:
-      priv->opacity = g_value_get_double (value);
+      opacity = g_value_get_double (value);
+      if (opacity >= 0.0)
+        priv->opacity = opacity;
       break;
     case PROP_BRUSH_SPACING:
-      priv->spacing = g_value_get_int (value);
+      spacing = g_value_get_int (value);
+      if (spacing != -1)
+        priv->spacing = spacing;
       break;
     case PROP_BRUSH_PAINT_MODE:
-      priv->paint_mode = g_value_get_int (value);
+      paint_mode = g_value_get_int (value);
+      if (paint_mode != -1)
+        priv->paint_mode = paint_mode;
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
