Commit bea1a446 authored by Ell's avatar Ell

app: in GimpBrushCore, free old paint buffer before allocating new one

In gimp_brush_core_get_paint_buffer(), when allocating a new paint
buffer, clear the old buffer *before* allocating the new one, to
reduce the amount of simultaneously allocated memory.
parent 088827e5
......@@ -839,14 +839,14 @@ gimp_brush_core_get_paint_buffer (GimpPaintCore *paint_core,
return paint_core->paint_buffer;
g_clear_object (&paint_core->paint_buffer);
temp_buf = gimp_temp_buf_new ((x2 - x1), (y2 - y1),
*paint_buffer_x = x1;
*paint_buffer_y = y1;
g_clear_object (&paint_core->paint_buffer);
paint_core->paint_buffer = gimp_temp_buf_create_buffer (temp_buf);
gimp_temp_buf_unref (temp_buf);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment