Skip to content
  • Ell's avatar
    Bug 795909 - Multiple images opened with floating selection ... · bc09c718
    Ell authored
    ... closing one of them crashes GIMP
    
    GimpSymmetry keeps a strong reference to the drawable passed to
    gimp_symmetry_set_origin() until the next call to set_origin(), or
    until it's destroyed.  This can unnecessarily extend the lifetime
    of the drawable.  In particular, it can extend the lifetime of a
    floating selection past the destruction of the image mask, during
    image destruction, which results in a NULL mask pointer in
    gimp_layer_invalidate_boundary(), called when detaching the
    floating selection as part of its destructor.
    
    Add gimp_symmetry_clear_origin(), which clears the origin set using
    gimp_symmetry_set_origin(), dropping the reference to the drawable,
    and call it in gimp_paint_core_paint() after painting.  This avoids
    extending the lifetime of the drawable, and fixes the bug.
    bc09c718