pidgin/pidgin

ab77968cc8e2
Parents 93ab30300b06
Children 34db408e4e3c
Avoid some GWarnings when selecting away from contacts

When we move the DisplayWindow to GtkListView, we moved to using an AdwBin as
the container widget and just set the child to what should be displayed. When
this happens to a ListView, each item gets deleted and for some reason the
bound property closures in the factory get called with an item that is set to
NULL. So if we get passed NULL, we just need to bail.

Testing Done:
Ran under `gdb` with `G_DEBUG=fatal-warnings` and verified that it didn't break when I switched the display window from contacts to conversations.

Reviewed at https://reviews.imfreedom.org/r/2233/
--- a/pidgin/pidgincontactlist.c Fri Feb 17 19:37:13 2023 -0600
+++ b/pidgin/pidgincontactlist.c Fri Feb 17 19:38:52 2023 -0600
@@ -88,6 +88,10 @@
return NULL;
}
+ if(!PURPLE_IS_PERSON(person)) {
+ return NULL;
+ }
+
info = purple_person_get_priority_contact_info(person);
/* All of the contact info in the manager are PurpleContact's so this cast