aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-chat-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r--src/empathy-chat-window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 8a6653ae5..e0e9dae5d 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -325,7 +325,10 @@ chat_window_update (EmpathyChatWindow *window)
remote_contact = empathy_chat_get_remote_contact (priv->current_chat);
icon = empathy_pixbuf_avatar_from_contact_scaled (remote_contact, 0, 0);
gtk_window_set_icon (GTK_WINDOW (priv->dialog), icon);
- g_object_unref (icon);
+
+ if (icon != NULL) {
+ g_object_unref (icon);
+ }
} else {
gtk_window_set_icon_name (GTK_WINDOW (priv->dialog), NULL);
}