[libdazzle] tab: sink floating reference on target value



commit 59a16f361facec15fb7db18ace55e8dc6f339bbe
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 8 23:20:31 2018 -0800

    tab: sink floating reference on target value

 src/panel/dzl-tab.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/panel/dzl-tab.c b/src/panel/dzl-tab.c
index ff55fd3..be3312d 100644
--- a/src/panel/dzl-tab.c
+++ b/src/panel/dzl-tab.c
@@ -1073,8 +1073,8 @@ dzl_tab_set_action_target_value (GtkActionable *actionable,
   if (priv->action_target_value != variant)
     {
       g_clear_pointer (&priv->action_target_value, g_variant_unref);
-      if (variant)
-        priv->action_target_value = g_variant_ref (variant);
+      if (variant != NULL)
+        priv->action_target_value = g_variant_ref_sink (variant);
       g_object_notify (G_OBJECT (self), "action-target");
     }
 }


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