diff --git a/ChangeLog b/ChangeLog index 6aba7e89ab..6262a53ad4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-08-22 Simon Budig + + * app/tools/gimpvectortool.c + * app/vectors/gimpbezierstroke.c: OK, now valgrind is happy. + 2003-08-22 Simon Budig * app/vectors/gimpstroke.c diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c index 1e3a2a99ff..80f24ace43 100644 --- a/app/tools/gimpvectortool.c +++ b/app/tools/gimpvectortool.c @@ -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); diff --git a/app/vectors/gimpbezierstroke.c b/app/vectors/gimpbezierstroke.c index 3de43fbfc8..de3b69ae51 100644 --- a/app/vectors/gimpbezierstroke.c +++ b/app/vectors/gimpbezierstroke.c @@ -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;