pidgin/pidgin

Parents 9aeedc02a0e4
Children 3f180523eb3b
jabber: Use purple_strequal to compare possibly-null ft_proxies setting

Fixes a crash when logging in to migrated accounts, introduced by 5813479c8e02.
The release-2.x.y branch isn't affected because it didn't use NULL as the
default value.

g_str_equal() isn't even intended for comparisons like this, it's a hash table
equality function.
--- a/libpurple/protocols/jabber/jabber.c Tue Nov 01 02:10:27 2016 +0000
+++ b/libpurple/protocols/jabber/jabber.c Fri Nov 04 23:32:06 2016 -0300
@@ -1124,8 +1124,8 @@
/* replace old default proxies with the new default: NULL
* TODO: these can eventually be removed */
- if (g_str_equal("proxy.jabber.org", purple_account_get_string(account, "ft_proxies", ""))
- || g_str_equal("proxy.eu.jabber.org", purple_account_get_string(account, "ft_proxies", "")))
+ if (purple_strequal("proxy.jabber.org", purple_account_get_string(account, "ft_proxies", ""))
+ || purple_strequal("proxy.eu.jabber.org", purple_account_get_string(account, "ft_proxies", "")))
purple_account_set_string(account, "ft_proxies", NULL);
/*