Set the default image when clearing the avatar, even if there were no avatar previous...
authorXavier Claessens <xclaesse@gmail.com>
Mon, 13 Apr 2009 09:11:32 +0000 (09:11 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 13 Apr 2009 09:11:32 +0000 (09:11 +0000)
From: Xavier Claessens <xclaesse@gmail.com>

svn path=/trunk/; revision=2817

libempathy-gtk/empathy-avatar-chooser.c

index 5d1c90fcba2b3c10886b48582d39a0ab630fba5e..04a5ed63eb2a3dc951df4f38b564f29c349d9356 100644 (file)
@@ -578,13 +578,11 @@ avatar_chooser_clear_image (EmpathyAvatarChooser *chooser)
        EmpathyAvatarChooserPriv *priv = GET_PRIV (chooser);
        GtkWidget *image;
 
-       if (priv->avatar == NULL) {
-               return;
+       if (priv->avatar != NULL) {
+               empathy_avatar_unref (priv->avatar);
+               priv->avatar = NULL;
        }
 
-       empathy_avatar_unref (priv->avatar);
-       priv->avatar = NULL;
-
        image = gtk_image_new_from_icon_name ("stock_person", GTK_ICON_SIZE_DIALOG);
        gtk_button_set_image (GTK_BUTTON (chooser), image);
        g_signal_emit (chooser, signals[CHANGED], 0);