app: in gimp_composite_blend(), avoid overwriting input in some cases

Note that in some cases the alloca may be unnecessary, but this keeps
the code clean, and we have to be able to *potentially* do the alloca
anyway, so what the hell.
This commit is contained in:
Ell 2017-01-19 13:51:48 -05:00
parent a5ee5f28f9
commit f6436eee96

View file

@ -290,10 +290,14 @@ gimp_composite_blend (gfloat *in,
read it for the compositing stage */
blend_out = g_alloca (sizeof (gfloat) * 4 * samples);
if (fish_to_blend)
if (fish_to_blend || fish_to_composite)
{
blend_in = g_alloca (sizeof (gfloat) * 4 * samples);
blend_layer = g_alloca (sizeof (gfloat) * 4 * samples);
}
if (fish_to_blend)
{
babl_process (fish_to_blend, in, blend_in, samples);
babl_process (fish_to_blend, layer, blend_layer, samples);
}