[gimp] app: don't ref the layer mask twice when keeping it around while loading



commit 21ad9d33b76f49f5be55248f98b40dd80027003b
Author: Michael Natterer <mitch gimp org>
Date:   Thu Mar 3 10:57:38 2011 +0100

    app: don't ref the layer mask twice when keeping it around while loading
    
    Don't g_object_ref() *and* g_object_ref_sink() it when temporatily
    attaching it as object data to its layer.

 app/xcf/xcf-load.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 3b14e56..3d27854 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -1149,9 +1149,8 @@ xcf_load_layer (XcfInfo    *info,
        * attach it so it can be added when all layers are loaded
        */
       g_object_set_data_full (G_OBJECT (layer), "gimp-layer-mask",
-                              g_object_ref (layer_mask),
+                              g_object_ref_sink (layer_mask),
                               (GDestroyNotify) g_object_unref);
-      g_object_ref_sink (layer_mask);
     }
 
   /* attach the floating selection... */



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