[gimp] Bug 703806: GIMP crashes when scaling an image



commit 3cc923d5a50287b2a7ab77dce381aabab3e37418
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Tue Jul 9 19:41:52 2013 +0200

    Bug 703806: GIMP crashes when scaling an image
    
    during an image rescale, while spinning the main-loop,
    layer-groups preview generation used to start before their
    layers were fully rescaled, so it tried to access tiles that
    were not yet there

 app/core/gimpimage-scale.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpimage-scale.c b/app/core/gimpimage-scale.c
index 2e8b129..1a726cc 100644
--- a/app/core/gimpimage-scale.c
+++ b/app/core/gimpimage-scale.c
@@ -24,6 +24,7 @@
 #include "gimp.h"
 #include "gimpcontainer.h"
 #include "gimpguide.h"
+#include "gimpgrouplayer.h"
 #include "gimpimage.h"
 #include "gimpimage-guides.h"
 #include "gimpimage-item-list.h"
@@ -153,7 +154,10 @@ gimp_image_scale (GimpImage             *image,
 
       /*  group layers are updated automatically  */
       if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
-        continue;
+        {
+          gimp_group_layer_suspend_resize (GIMP_GROUP_LAYER (item), FALSE);
+          continue;
+        }
 
       if (! gimp_item_scale_by_factors (item,
                                         img_scale_w, img_scale_h,
@@ -168,6 +172,11 @@ gimp_image_scale (GimpImage             *image,
         }
     }
 
+  for (list = all_layers; list; list = g_list_next (list))
+    if (gimp_viewable_get_children (list->data))
+      gimp_group_layer_resume_resize (list->data, FALSE);
+
+
   /*  Scale all Guides  */
   for (list = gimp_image_get_guides (image);
        list;


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