From 95becc7615c7e9cf2f6135c8d5b0fe1cca86648f Mon Sep 17 00:00:00 2001 From: Michael Henning Date: Sat, 30 Nov 2013 16:31:57 -0500 Subject: [PATCH] Bug 719593 - On clang, brush outline is not displayed Don't access path_data->len after path_data has been freed. --- app/core/gimpbezierdesc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/core/gimpbezierdesc.c b/app/core/gimpbezierdesc.c index 6b9404238c..5966262360 100644 --- a/app/core/gimpbezierdesc.c +++ b/app/core/gimpbezierdesc.c @@ -110,6 +110,7 @@ gimp_bezier_desc_new_from_bound_segs (GimpBoundSeg *bound_segs, gint n_points; gint seg; gint i; + guint path_data_len; g_return_val_if_fail (bound_segs != NULL, NULL); g_return_val_if_fail (n_bound_segs > 0, NULL); @@ -158,8 +159,10 @@ gimp_bezier_desc_new_from_bound_segs (GimpBoundSeg *bound_segs, g_free (points); + path_data_len = path_data->len; + return gimp_bezier_desc_new ((cairo_path_data_t *) g_array_free (path_data, FALSE), - path_data->len); + path_data_len); } void