aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-avatar-chooser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-avatar-chooser.c')
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 5d1c90fcb..04a5ed63e 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -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);