[gimp/soc-2009-dynamics] Fix seg fault for gimpcontext



commit 822e39498146fdefc2c4e6c94ef242077fc61597
Author: zhenfeng zhao <zhzzf_0808 hotmail com>
Date:   Wed Aug 19 13:29:06 2009 -0300

    Fix seg fault for gimpcontext

 app/core/gimpcontext.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpcontext.c b/app/core/gimpcontext.c
index b0a2fc6..0696c8d 100644
--- a/app/core/gimpcontext.c
+++ b/app/core/gimpcontext.c
@@ -305,6 +305,7 @@ static const gchar * const gimp_context_prop_names[] =
   "opacity",
   "paint-mode",
   "brush",
+  "dynamics",
   "pattern",
   "gradient",
   "palette",
@@ -333,6 +334,7 @@ static GType gimp_context_prop_types[] =
   0,
   0,
   0,
+  0,
   0
 };
 
@@ -708,6 +710,9 @@ gimp_context_init (GimpContext *context)
   context->brush           = NULL;
   context->brush_name      = NULL;
 
+  context->dynamics        = NULL;
+  context->dynamics_name   = NULL;
+
   context->pattern         = NULL;
   context->pattern_name    = NULL;
 
@@ -898,6 +903,17 @@ gimp_context_finalize (GObject *object)
       context->brush_name = NULL;
     }
 
+  if (context->dynamics)
+    {
+      g_object_unref (context->dynamics);
+      context->dynamics = NULL;
+    }
+  if (context->dynamics_name)
+    {
+      g_free (context->dynamics_name);
+      context->dynamics_name = NULL;
+    }
+
   if (context->pattern)
     {
       g_object_unref (context->pattern);



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