[gimp] app: don't try to add a NULL boundary to GimpBrush's boundary cache



commit 3ab59f1bff865a1f0e50b23a09dc4f7f4220b038
Author: Michael Natterer <mitch gimp org>
Date:   Fri Apr 8 21:22:55 2011 +0200

    app: don't try to add a NULL boundary to GimpBrush's boundary cache

 app/core/gimpbrush.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpbrush.c b/app/core/gimpbrush.c
index 68f605c..5c07a80 100644
--- a/app/core/gimpbrush.c
+++ b/app/core/gimpbrush.c
@@ -668,10 +668,17 @@ gimp_brush_transform_boundary (GimpBrush *brush,
                                                                    width,
                                                                    height);
 
-      gimp_brush_cache_add (brush->boundary_cache,
-                            (gpointer) boundary,
-                            *width, *height,
-                            scale, aspect_ratio, angle, hardness);
+      /*  while the brush mask is always at least 1x1 pixels, its
+       *  outline can correctly be NULL
+       *
+       *  FIXME: make the cache handle NULL things when it is
+       *         properly implemented
+       */
+      if (boundary)
+        gimp_brush_cache_add (brush->boundary_cache,
+                              (gpointer) boundary,
+                              *width, *height,
+                              scale, aspect_ratio, angle, hardness);
     }
 
   return boundary;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]