# HG changeset patch # User Christian Hammond # Date 1028947375 0 # Node ID a5d356cba156abdcb76284cbfd22ff070baa2570 # Parent 7cd904828d3dd0ceff271d4ade5538eabadc0db6 [gaim-migrate @ 3409] It's best to initialize p and THEN check the contents of it. committer: Tailor Script diff -r 7cd904828d3d -r a5d356cba156 src/prpl.c --- a/src/prpl.c Thu Aug 08 19:14:20 2002 +0000 +++ b/src/prpl.c Sat Aug 10 02:42:55 2002 +0000 @@ -75,6 +75,11 @@ return; } + p = g_new0(struct prpl, 1); + pi(p); + if ((old = find_prpl(p->protocol)) != NULL) + unload_protocol(old); + if (p->protocol == PROTO_ICQ) do_error_dialog(_("Gaim has loaded the ICQ plugin. This plugin has been deprecated. " "As such, it was probably not compiled from the same version of the " @@ -82,10 +87,7 @@ "It is reccomended that you use the AIM/ICQ protocol to connect to ICQ"), _("Protocol Warning")); - p = g_new0(struct prpl, 1); - pi(p); - if ((old = find_prpl(p->protocol)) != NULL) - unload_protocol(old); + protocols = g_slist_insert_sorted(protocols, p, (GCompareFunc)proto_compare); regenerate_user_list(); }