[gnome-photos] preview-view: Don't leak the GeglNode



commit 8fff3a06fe335cc28739667e0e54b3600724a3a8
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Dec 15 20:14:50 2015 +0100

    preview-view: Don't leak the GeglNode
    
    GeglGtkView doesn't steal the reference to the GeglNode. The comment
    was wrong. Digging through the history hasn't revealed any clues about
    what I was thinking back then. Let's assume that I was hallucinating.

 src/photos-preview-view.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-preview-view.c b/src/photos-preview-view.c
index 192ea43..f950418 100644
--- a/src/photos-preview-view.c
+++ b/src/photos-preview-view.c
@@ -713,9 +713,7 @@ photos_preview_view_set_node (PhotosPreviewView *self, GeglNode *node)
 
       priv->node = g_object_ref (node);
       view = photos_preview_view_get_view_from_view_container (view_container);
-
-      /* Steals the reference to the GeglNode. */
-      gegl_gtk_view_set_node (GEGL_GTK_VIEW (view), g_object_ref (priv->node));
+      gegl_gtk_view_set_node (GEGL_GTK_VIEW (view), priv->node);
       gtk_widget_queue_draw (view);
     }
 }


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