use GSlice to allocate the transform matrix.

2007-05-29  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.c: use GSlice to allocate the transform
	matrix.

svn path=/trunk/; revision=22652
This commit is contained in:
Sven Neumann 2007-05-29 09:44:31 +00:00 committed by Sven Neumann
parent b19ebc29f9
commit 2027fdf9ab
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-05-29 Sven Neumann <sven@gimp.org>
* app/tools/gimpdrawtool.c: use GSlice to allocate the transform
matrix.
2007-05-29 Sven Neumann <sven@gimp.org> 2007-05-29 Sven Neumann <sven@gimp.org>
* app/vectors/gimpvectors-import.c: don't memdup gslice-allocated * app/vectors/gimpvectors-import.c: don't memdup gslice-allocated

View File

@ -118,7 +118,7 @@ gimp_draw_tool_finalize (GObject *object)
if (draw_tool->transform) if (draw_tool->transform)
{ {
g_free (draw_tool->transform); g_slice_free (GimpMatrix3, draw_tool->transform);
draw_tool->transform = NULL; draw_tool->transform = NULL;
} }
@ -346,12 +346,15 @@ gimp_draw_tool_set_transform (GimpDrawTool *draw_tool,
if (draw_tool->transform) if (draw_tool->transform)
{ {
g_free (draw_tool->transform); g_slice_free (GimpMatrix3, draw_tool->transform);
draw_tool->transform = NULL; draw_tool->transform = NULL;
} }
if (transform) if (transform)
draw_tool->transform = g_memdup (transform, sizeof (GimpMatrix3)); {
draw_tool->transform = g_slice_new (GimpMatrix3);
memcpy (draw_tool->transform, transform, sizeof (GimpMatrix3));
}
gimp_draw_tool_resume (draw_tool); gimp_draw_tool_resume (draw_tool);
} }