Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv1024
Modified Files:
prpl.c
Log Message:
It's best to initialize p and THEN check the contents of it.
Index: prpl.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/prpl.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- prpl.c 7 Aug 2002 23:25:33 -0000 1.55
+++ prpl.c 10 Aug 2002 02:42:55 -0000 1.56
@@ -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();
}
|