pidgin/pidgin

Parents adf6d358d438
Children f4c0e44c3e20
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/
--- a/libpurple/purplepresence.c Mon Apr 03 23:11:34 2023 -0500
+++ b/libpurple/purplepresence.c Fri Apr 07 00:49:29 2023 -0500
@@ -653,6 +653,10 @@
return priv->message;
}
+ if(priv->active_status == NULL) {
+ return NULL;
+ }
+
return purple_status_get_attr_string(priv->active_status, "message");
}
--- a/pidgin/pidgincontactlist.c Mon Apr 03 23:11:34 2023 -0500
+++ b/pidgin/pidgincontactlist.c Fri Apr 07 00:49:29 2023 -0500
@@ -84,13 +84,16 @@
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.
*/