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



commit 893990afce4590bc561f0c1ae1e7724625f0d980
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.

 app/core/gimpgrouplayer.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index a838c90294..2d1a7c7aa8 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -400,6 +400,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]