Issue #15328: Fix crash with smudge tool and auto expand layers

This commit is contained in:
balooii balooii 2026-03-17 22:55:25 +01:00 committed by Alx Sa
parent 3a60f800d4
commit 4026ec4828

View file

@ -246,8 +246,6 @@ gimp_smudge_start (GimpPaintCore *paint_core,
dest_pickable_off_y = 0;
}
pickable_buffer = gimp_pickable_get_buffer (dest_pickable);
n_strokes = gimp_symmetry_get_size (sym);
for (i = 0; i < n_strokes; i++)
{
@ -280,6 +278,11 @@ gimp_smudge_start (GimpPaintCore *paint_core,
if (! paint_buffer)
continue;
/* Fetch the buffer _after_ gimp_paint_core_get_paint_buffer() as it
* may have expanded the drawable when "Expand Layers" is enabled.
*/
pickable_buffer = gimp_pickable_get_buffer (dest_pickable);
gimp_smudge_accumulator_coords (paint_core, &coords, 0, &x, &y);
/* If clipped, prefill the smudge buffer with the color at the