diff options
author | Gary Kramlich <grim@reaperworld.com> | 2023-04-07 00:49:29 -0500 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2023-04-07 00:49:29 -0500 |
commit | a7d28aa53a772a950f79d189310b32a3a765c007 (patch) | |
tree | 87b40ce44a01808472676f7cc1b9830577d1ee28 /pidgin | |
parent | bee99bb8f844575c7fdb938f998f859ee03fa23a (diff) | |
download | pidgin-a7d28aa53a772a950f79d189310b32a3a765c007.tar.gz |
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/
Diffstat (limited to 'pidgin')
-rw-r--r-- | pidgin/pidgincontactlist.c | 7 |
1 files changed, 5 insertions, 2 deletions
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. */ |