[gimp/metadata-browser] app: fix crashing brain damage when getting the projection's buffer



commit d6235580e50c227be466ef6bc52552e028dfb829
Author: Michael Natterer <mitch gimp org>
Date:   Wed May 9 15:30:30 2012 +0200

    app: fix crashing brain damage when getting the projection's buffer
    
    Introduced when removing gimp_pickable_get_tiles().

 app/core/gimpprojection-construct.c |    9 +++------
 app/core/gimpprojection.c           |    6 +-----
 2 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/app/core/gimpprojection-construct.c b/app/core/gimpprojection-construct.c
index 332bc61..ada1b81 100644
--- a/app/core/gimpprojection-construct.c
+++ b/app/core/gimpprojection-construct.c
@@ -254,7 +254,7 @@ gimp_projection_initialize (GimpProjection *proj,
 
   if (! coverage)
     {
-      GeglBuffer    *buffer;
+      GeglBuffer *buffer;
 
       if (proj->use_gegl)
         {
@@ -264,11 +264,8 @@ gimp_projection_initialize (GimpProjection *proj,
         }
       else
         {
-          GeglBuffer  *buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (proj));
-          TileManager *tiles  = gimp_gegl_buffer_get_tiles (buffer);
-          const Babl  *format = gimp_pickable_get_format (GIMP_PICKABLE (proj));
-
-          buffer = gimp_tile_manager_create_buffer (tiles, format);
+          buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (proj));
+          g_object_ref (buffer);
         }
 
       gegl_buffer_clear (buffer, GEGL_RECTANGLE (x, y, w, h));
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index cfd6973..6dc2610 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -312,12 +312,8 @@ gimp_projection_get_buffer (GimpPickable *pickable)
 
       if (proj->sink_node)
         {
-          GeglBuffer *buffer;
-
-          buffer = gimp_projection_get_buffer (GIMP_PICKABLE (proj));
-
           gegl_node_set (proj->sink_node,
-                         "buffer", buffer,
+                         "buffer", proj->buffer,
                          NULL);
         }
     }



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