]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-avatar-chooser.c
AvatarChooser: don't set contact_factory to NULL after unreffing.
[empathy.git] / libempathy-gtk / empathy-avatar-chooser.c
index 5c5715eba3b3c0105a7653981c4276113512c0de..71bbae42a4da9ffea0208a22c51b5d1154334438 100644 (file)
@@ -223,12 +223,11 @@ avatar_chooser_finalize (GObject *object)
 
        priv = GET_PRIV (object);
 
-       g_object_unref (priv->contact_factory);
-       priv->contact_factory = NULL;
-
        avatar_chooser_set_account (EMPATHY_AVATAR_CHOOSER (object), NULL);
        g_assert (priv->account == NULL && priv->tp_contact_factory == NULL);
 
+       g_object_unref (priv->contact_factory);
+
        if (priv->avatar != NULL) {
                empathy_avatar_unref (priv->avatar);
        }