From a7d28aa53a772a950f79d189310b32a3a765c007 Mon Sep 17 00:00:00 2001 From: Gary Kramlich Date: Fri, 7 Apr 2023 00:49:29 -0500 Subject: Fix some issues where we were triggering GWarnings with presence Testing Done: I ran into these while porting the Bonjour prpl to the new status API, so I verified they stopped happening against that code. Reviewed at https://reviews.imfreedom.org/r/2426/ --- pidgin/pidgincontactlist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pidgin') diff --git a/pidgin/pidgincontactlist.c b/pidgin/pidgincontactlist.c index fd09bbe6a4..394d3afc65 100644 --- a/pidgin/pidgincontactlist.c +++ b/pidgin/pidgincontactlist.c @@ -84,13 +84,16 @@ pidgin_contact_list_avatar_cb(G_GNUC_UNUSED GObject *self, return NULL; } + info = purple_person_get_priority_contact_info(person); + if(!PURPLE_IS_CONTACT_INFO(info)) { + return NULL; + } + pixbuf = purple_person_get_avatar_for_display(person); if(GDK_IS_PIXBUF(pixbuf)) { return gdk_texture_new_for_pixbuf(pixbuf); } - info = purple_person_get_priority_contact_info(person); - /* All of the contact info in the manager are PurpleContact's so this cast * is fine. */ -- cgit v1.2.1