[gnome-photos] pipeline: Ensure that all nodes are actually removed during revert



commit 3e2e0565b6dd099e4dc4a9ea6eb41d163f464583
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Feb 23 14:54:04 2016 +0100

    pipeline: Ensure that all nodes are actually removed during revert
    
    It was working because we were linking input and output at the end,
    which ensured that the linkage was correct. However, the old GeglNodes
    would still linger on because they were attached to the graph.
    
    Fall out from 96b21d9c373280ce8cc7ca512095dd0c619539f2
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761683

 src/photos-pipeline.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-pipeline.c b/src/photos-pipeline.c
index cc05c5e..7f91ec6 100644
--- a/src/photos-pipeline.c
+++ b/src/photos-pipeline.c
@@ -600,8 +600,11 @@ photos_pipeline_revert (PhotosPipeline *self)
 
   while (last != NULL && last != input)
     {
+      GeglNode *last2;
+
+      last2 = gegl_node_get_producer (last, "input", NULL);
       gegl_node_remove_child (self->graph, last);
-      last = gegl_node_get_producer (output, "input", NULL);
+      last = last2;
     }
 
   gegl_node_link (input, output);


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