Simplify use of GCancellable
g_cancellable_cancell can be called without checking for a NULL value. Use g_clear_object instead of g_object_unref
This commit is contained in:
parent
dd61d98ec5
commit
a64ef75ad7
9 changed files with 23 additions and 54 deletions
|
@ -267,8 +267,7 @@ net_object_finalize (GObject *object)
|
|||
|
||||
g_free (priv->id);
|
||||
g_free (priv->title);
|
||||
if (priv->cancellable != NULL)
|
||||
g_object_unref (priv->cancellable);
|
||||
g_clear_object (&priv->cancellable);
|
||||
|
||||
if (priv->client)
|
||||
g_object_remove_weak_pointer (G_OBJECT (priv->client), (gpointer *) (&priv->client));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue