[libdazzle] shortcuts: cleanup



commit 3a1483b6d26c484ff2b94702f75bdf7918f9899a
Author: Christian Hergert <chergert redhat com>
Date:   Sat Aug 10 20:41:53 2019 -0700

    shortcuts: cleanup

 src/shortcuts/dzl-shortcut-controller.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-controller.c b/src/shortcuts/dzl-shortcut-controller.c
index e02c385..af54f5f 100644
--- a/src/shortcuts/dzl-shortcut-controller.c
+++ b/src/shortcuts/dzl-shortcut-controller.c
@@ -438,12 +438,7 @@ dzl_shortcut_controller_finalize (GObject *object)
   DzlShortcutController *self = (DzlShortcutController *)object;
   DzlShortcutControllerPrivate *priv = dzl_shortcut_controller_get_instance_private (self);
 
-  if (priv->widget != NULL)
-    {
-      g_object_remove_weak_pointer (G_OBJECT (priv->widget), (gpointer *)&priv->widget);
-      priv->widget = NULL;
-    }
-
+  dzl_clear_weak_pointer (&priv->widget);
   g_clear_pointer (&priv->commands, g_hash_table_unref);
   g_clear_pointer (&priv->commands_table, dzl_shortcut_chord_table_free);
   g_clear_object (&priv->root);


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