pidgin/pidgin

Parents 55f4486bf6bc
Children 3ec3eae31fe4
Fix a few things that were throwing g_warning's during startup

Testing Done:
Compiled and ran locally with `G_DEBUG=fatal-warnings`.

Reviewed at https://reviews.imfreedom.org/r/429/
--- a/libpurple/server.c Thu Jan 14 22:35:42 2021 -0600
+++ b/libpurple/server.c Fri Jan 15 00:11:21 2021 -0600
@@ -396,19 +396,22 @@
}
}
-void purple_serv_set_permit_deny(PurpleConnection *gc)
-{
- if (gc) {
+void
+purple_serv_set_permit_deny(PurpleConnection *gc) {
+ if(gc) {
PurpleProtocol *protocol = purple_connection_get_protocol(gc);
- PurpleProtocolPrivacy *privacy = PURPLE_PROTOCOL_PRIVACY(protocol);
+
+ if(PURPLE_IS_PROTOCOL_PRIVACY(protocol)) {
+ PurpleProtocolPrivacy *privacy = PURPLE_PROTOCOL_PRIVACY(protocol);
- /*
- * this is called when either you import a buddy list, and make lots
- * of changes that way, or when the user toggles the permit/deny mode
- * in the prefs. In either case you should probably be resetting and
- * resending the permit/deny info when you get this.
- */
- purple_protocol_privacy_set_permit_deny(privacy, gc);
+ /*
+ * this is called when either you import a buddy list, and make lots
+ * of changes that way, or when the user toggles the permit/deny mode
+ * in the prefs. In either case you should probably be resetting and
+ * resending the permit/deny info when you get this.
+ */
+ purple_protocol_privacy_set_permit_deny(privacy, gc);
+ }
}
}
--- a/pidgin/gtkrequest.c Thu Jan 14 22:35:42 2021 -0600
+++ b/pidgin/gtkrequest.c Fri Jan 15 00:11:21 2021 -0600
@@ -93,10 +93,15 @@
GtkWidget *image;
GdkPixbuf *pixbuf;
- if (!account)
+ if(!PURPLE_IS_ACCOUNT(account)) {
return;
+ }
pixbuf = pidgin_create_protocol_icon(account, PIDGIN_PROTOCOL_ICON_SMALL);
+ if(!GDK_IS_PIXBUF(pixbuf)) {
+ return;
+ }
+
image = gtk_image_new_from_pixbuf(pixbuf);
g_object_unref(G_OBJECT(pixbuf));