Index: app/paint/gimpbrushcore.c
===================================================================
--- app/paint/gimpbrushcore.c	(revision 24626)
+++ app/paint/gimpbrushcore.c	(working copy)
@@ -779,6 +779,8 @@ gimp_brush_core_create_bound_segs (GimpB
     {
       PixelRegion  PR = { 0, };
       BoundSeg    *boundary;
+      BoundSeg    *sorted;
+      gint         num_segments;
       gint         num_groups;
 
       pixel_region_init_temp_buf (&PR, mask,
@@ -787,16 +789,15 @@ gimp_brush_core_create_bound_segs (GimpB
       boundary = boundary_find (&PR, BOUNDARY_WITHIN_BOUNDS,
                                 0, 0, PR.w, PR.h,
                                 0,
-                                &core->n_brush_bound_segs);
-
-      core->brush_bound_segs = boundary_sort (boundary,
-                                              core->n_brush_bound_segs,
-                                              &num_groups);
-
-      core->n_brush_bound_segs += num_groups;
+                                &num_segments);
 
+      sorted = boundary_sort (boundary, num_segments, &num_groups);
       g_free (boundary);
 
+      core->brush_bound_segs = boundary_simplify (sorted, num_groups,
+                                                  &core->n_brush_bound_segs);
+      g_free (sorted);
+
       core->brush_bound_width  = mask->width;
       core->brush_bound_height = mask->height;
 
