[gegl/soc-2011-seamless-clone: 44/49] Small fixes to variables lacking initialization



commit 5a5475f4be05497a334bdf5a3f31dafb0ef20792
Author: Barak Itkin <lightningismyname gmail com>
Date:   Wed Sep 26 22:54:19 2012 +0200

    Small fixes to variables lacking initialization

 operations/common/seamless-clone/sc-context.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/seamless-clone/sc-context.c b/operations/common/seamless-clone/sc-context.c
index 23454ea..941e1c2 100644
--- a/operations/common/seamless-clone/sc-context.c
+++ b/operations/common/seamless-clone/sc-context.c
@@ -121,6 +121,8 @@ sc_context_create_outline (GeglBuffer          *input,
   ScOutline *outline = sc_outline_find (roi, input, &ignored_islands);
   guint      length  = sc_outline_length (outline);
 
+  *error = SC_CREATION_ERROR_NONE;
+
   if (length == 0)
     {
       if (ignored_islands)
@@ -145,7 +147,6 @@ sc_context_create_outline (GeglBuffer          *input,
   if (*error != SC_CREATION_ERROR_NONE)
     {
       sc_outline_free (outline);
-      outline = NULL;
     }
 
   return outline;
@@ -274,7 +275,11 @@ sc_context_prepare_render (ScContext    *context,
                            ScRenderInfo *info)
 {
   if (context->render_cache == NULL)
-    context->render_cache = g_slice_new (ScRenderCache);
+    {
+      context->render_cache = g_slice_new (ScRenderCache);
+      context->render_cache->pt2col = NULL;
+      context->render_cache->is_valid = FALSE;
+    }
 
   context->render_cache->is_valid = FALSE;
 



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