[gimp] Bug 719593 - On clang, brush outline is not displayed



commit 95becc7615c7e9cf2f6135c8d5b0fe1cca86648f
Author: Michael Henning <drawoc darkrefraction com>
Date:   Sat Nov 30 16:31:57 2013 -0500

    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 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpbezierdesc.c b/app/core/gimpbezierdesc.c
index 6b94042..5966262 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]