[gimp/gimp-2-10] Issue #4584 - Segfault when closing an image with a layer group ...



commit e467e1038678170b251751885ff8355e3108e259
Author: Ell <ell_se yahoo com>
Date:   Fri Feb 7 23:28:19 2020 +0200

    Issue #4584 - Segfault when closing an image with a layer group ...
    
    ... containing a floating selection
    
    When destroying a GimpGroupLayer, remove all the children signal
    handlers before destroying the container, so that we don't attempt
    to reallocate the group's projection in response to
    "update-bounding-box" signals emitted during layer destruction,
    which can happen for floating selections.
    
    (cherry picked from commit 893990afce4590bc561f0c1ae1e7724625f0d980)

 app/core/gimpgrouplayer.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index bf65df18b6..484f705457 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -399,6 +399,12 @@ gimp_group_layer_finalize (GObject *object)
                                             gimp_group_layer_stack_update,
                                             object);
 
+      /* this is particularly important to avoid reallocating the projection
+       * in response to a "bounding-box-changed" signal, which can be emitted
+       * during layer destruction.  see issue #4584.
+       */
+      gimp_container_remove_handlers_by_data (private->children, object);
+
       g_clear_object (&private->children);
     }
 


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