[gegl] Unset ->source when removing a handler from the chain



commit 8000881f36082b3313b6fd68900b622bfc6032ff
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Sun Feb 2 06:59:26 2014 -0800

    Unset ->source when removing a handler from the chain
    
    Otherwise this reference may outlive the buffer and
    cause the chain to get destroyed out of order.

 gegl/buffer/gegl-buffer.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer.c b/gegl/buffer/gegl-buffer.c
index 0bdd585..aa84395 100644
--- a/gegl/buffer/gegl-buffer.c
+++ b/gegl/buffer/gegl-buffer.c
@@ -1069,6 +1069,9 @@ gegl_buffer_remove_handler (GeglBuffer *buffer,
   g_return_if_fail (g_slist_find (chain->chain, handler));
 
   chain->chain = g_slist_remove (chain->chain, handler);
+
+  gegl_tile_handler_set_source (handler, NULL);
+
   g_object_unref (handler);
 
   gegl_tile_handler_chain_bind (chain);


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