app/tools/gimpvectortool.c OK, now valgrind is happy.

2003-08-22  Simon Budig  <simon@gimp.org>

	* app/tools/gimpvectortool.c
	* app/vectors/gimpbezierstroke.c: OK, now valgrind is happy.
This commit is contained in:
Simon Budig 2003-08-22 15:20:13 +00:00 committed by Simon Budig
parent 8ef4d16d42
commit 14d0ec8b2c
3 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2003-08-22 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c
* app/vectors/gimpbezierstroke.c: OK, now valgrind is happy.
2003-08-22 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.c

View File

@ -573,7 +573,8 @@ gimp_vector_tool_on_handle (GimpTool *tool,
vector_tool = GIMP_VECTOR_TOOL (tool);
if (!vector_tool->vectors)
if (vector_tool->vectors == NULL
|| vector_tool->vectors->strokes == NULL)
{
if (ret_anchor)
*ret_anchor = NULL;
@ -727,7 +728,8 @@ gimp_vector_tool_on_curve (GimpTool *tool,
}
}
if (gimp_draw_tool_on_handle (GIMP_DRAW_TOOL (tool), gdisp,
if (min_dist >= 0 &&
gimp_draw_tool_on_handle (GIMP_DRAW_TOOL (tool), gdisp,
coord->x,
coord->y,
GIMP_HANDLE_CIRCLE,
@ -764,7 +766,7 @@ gimp_vector_tool_oper_update (GimpTool *tool,
{
GimpVectorTool *vector_tool;
GimpVectorOptions *options;
GimpAnchor *anchor;
GimpAnchor *anchor = NULL;
GimpVectorMode edit_mode;
vector_tool = GIMP_VECTOR_TOOL (tool);

View File

@ -1069,6 +1069,7 @@ gimp_bezier_stroke_interpolate (const GimpStroke *stroke,
GList *anchorlist;
GimpCoords segmentcoords[4];
gint count;
gboolean need_endpoint = FALSE;
g_return_val_if_fail (GIMP_IS_BEZIER_STROKE (stroke), NULL);
g_return_val_if_fail (ret_closed != NULL, NULL);
@ -1099,6 +1100,7 @@ gimp_bezier_stroke_interpolate (const GimpStroke *stroke,
gimp_bezier_coords_subdivide (segmentcoords, precision, &ret_coords);
segmentcoords[0] = segmentcoords[3];
count = 1;
need_endpoint = TRUE;
}
}
@ -1116,10 +1118,12 @@ gimp_bezier_stroke_interpolate (const GimpStroke *stroke,
segmentcoords[3] = ((GimpAnchor *) anchorlist->data)->position;
gimp_bezier_coords_subdivide (segmentcoords, precision, &ret_coords);
need_endpoint = TRUE;
}
ret_coords = g_array_append_val (ret_coords, segmentcoords[3]);
if (need_endpoint)
ret_coords = g_array_append_val (ret_coords, segmentcoords[3]);
*ret_closed = stroke->closed;