gegl r2678 - in trunk: . gegl/property-types
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2678 - in trunk: . gegl/property-types
- Date: Sat, 1 Nov 2008 16:29:36 +0000 (UTC)
Author: ok
Date: Sat Nov 1 16:29:36 2008
New Revision: 2678
URL: http://svn.gnome.org/viewvc/gegl?rev=2678&view=rev
Log:
* gegl/property-types/gegl-path.c: (gegl_path_insert): fix slice
allocation to only allocate enough memory for stored coordinates.
Modified:
trunk/ChangeLog
trunk/gegl/property-types/gegl-path.c
Modified: trunk/gegl/property-types/gegl-path.c
==============================================================================
--- trunk/gegl/property-types/gegl-path.c (original)
+++ trunk/gegl/property-types/gegl-path.c Sat Nov 1 16:29:36 2008
@@ -1164,13 +1164,15 @@
GeglPathPrivate *priv = GEGL_PATH_GET_PRIVATE (vector);
GeglPathList *iter;
GeglPathList *prev = NULL;
+ InstructionInfo *info = lookup_instruction_info (knot->type);
gint count=0;
for (iter = priv->path; iter; iter=iter->next)
{
if (count == pos)
{
- GeglPathList *new = g_slice_new (GeglPathList);
+ GeglPathList *new = g_slice_alloc0 (sizeof (gpointer) + sizeof (gchar) + sizeof (gfloat)*2 *info->pairs);
+ new->d.type=knot->type;
copy_data (knot, &new->d);
new->next = iter->next;
/*if (prev)
@@ -1185,7 +1187,6 @@
}
if (pos==-1)
{
- InstructionInfo *info = lookup_instruction_info (knot->type);
GeglPathList *new = g_slice_alloc0 (sizeof (gpointer) + sizeof (gchar) + sizeof (gfloat)*2 *info->pairs);
new->d.type = knot->type;
copy_data (knot, &new->d);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]