From 1454a06e8110fb41559e5a2f91f50e2b2bb8d4a3 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 26 Mar 2012 09:28:22 +0200 Subject: contact_widget_contact_update: check if widget_avatar is a chooser information->widget_avatar can actually be a EmpathyAvatarImage when displaying a read only widget. https://bugzilla.gnome.org/show_bug.cgi?id=672828 --- libempathy-gtk/empathy-contact-widget.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 1bfb38749..5691891a2 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -1406,8 +1406,11 @@ contact_widget_contact_update (EmpathyContactWidget *information) } else { - empathy_avatar_chooser_set_account ( - EMPATHY_AVATAR_CHOOSER (information->widget_avatar), account); + if (EMPATHY_IS_AVATAR_CHOOSER (information->widget_avatar)) + { + empathy_avatar_chooser_set_account ( + EMPATHY_AVATAR_CHOOSER (information->widget_avatar), account); + } if ((information->flags & EMPATHY_CONTACT_WIDGET_NO_ACCOUNT) == 0) { -- cgit v1.2.3