[gimp] app: make sure GimpFilterStack's initial empty graph passes through



commit e7babfed2e8ac1a0cf9759f90bad30a4d638116b
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 11 14:37:43 2013 +0200

    app: make sure GimpFilterStack's initial empty graph passes through

 app/core/gimpfilterstack.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/app/core/gimpfilterstack.c b/app/core/gimpfilterstack.c
index e35d8ed..deed88c 100644
--- a/app/core/gimpfilterstack.c
+++ b/app/core/gimpfilterstack.c
@@ -201,13 +201,18 @@ gimp_filter_stack_get_graph (GimpFilterStack *stack)
   input  = gegl_node_get_input_proxy  (stack->graph, "input");
   output = gegl_node_get_output_proxy (stack->graph, "output");
 
-  if (first)
-    gegl_node_connect_to (input, "output",
-                          first, "input");
-
-  if (previous)
-    gegl_node_connect_to (previous, "output",
-                          output,   "input");
+  if (first && previous)
+    {
+      gegl_node_connect_to (input, "output",
+                            first, "input");
+      gegl_node_connect_to (previous, "output",
+                            output,   "input");
+    }
+  else
+    {
+      gegl_node_connect_to (input,  "output",
+                            output, "input");
+    }
 
   return stack->graph;
 }


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