Commit e651c52e authored by Christian Hergert's avatar Christian Hergert
Browse files

shortcuts: use g_clear_weak_pointer() and g_set_weak_pointer()

parent dc338823
......@@ -371,14 +371,12 @@ dzl_shortcut_controller_set_widget (DzlShortcutController *self,
if (priv->widget != NULL)
{
dzl_shortcut_controller_disconnect (self);
g_object_remove_weak_pointer (G_OBJECT (priv->widget), (gpointer *)&priv->widget);
priv->widget = NULL;
g_clear_weak_pointer (&priv->widget);
}
if (widget != NULL && widget != priv->widget)
{
priv->widget = widget;
g_object_add_weak_pointer (G_OBJECT (priv->widget), (gpointer *)&priv->widget);
g_set_weak_pointer (&priv->widget, widget);
dzl_shortcut_controller_connect (self);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment