pidgin/pidgincontactlist.c

changeset 42065
b9dc817fbb3f
parent 42062
ab77968cc8e2
child 42178
e795355c3165
--- a/pidgin/pidgincontactlist.c	Sun Feb 19 04:11:37 2023 -0600
+++ b/pidgin/pidgincontactlist.c	Sun Feb 19 04:12:19 2023 -0600
@@ -76,22 +76,19 @@
 	GdkTexture *texture = NULL;
 	GdkPixbuf *pixbuf = NULL;
 
+	/* When filtering we get called for rows that have been filtered out. We
+	 * also get called during finalization. I'm not sure why either of these
+	 * cases happen, but they do.
+	 */
+	if(!PURPLE_IS_PERSON(person)) {
+		return NULL;
+	}
+
 	pixbuf = purple_person_get_avatar_for_display(person);
 	if(GDK_IS_PIXBUF(pixbuf)) {
 		return gdk_texture_new_for_pixbuf(pixbuf);
 	}
 
-	/* When filtering we get called for rows that have been filtered out. I'm
-	 * not sure why, but this does appear to be the case.
-	 */
-	if(person == NULL) {
-		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

mercurial