Mercurial > pidgin
diff src/server.c @ 13417:dc05405864bd
[gaim-migrate @ 15792]
Better NULL checking...
Resolves CID 64:
Event deref_ptr: Directly dereferenced pointer "b"
248 if (b->account->gc != NULL && b->account->gc->prpl != NULL)
Event check_after_deref: Pointer "b" dereferenced before NULL check
251 if (b && b->account->gc && og && ng) {
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 07 Mar 2006 01:56:29 +0000 |
parents | 44a8d46ee3c1 |
children | 2ec69a9763a5 |
line wrap: on
line diff
--- a/src/server.c Tue Mar 07 01:54:09 2006 +0000 +++ b/src/server.c Tue Mar 07 01:56:29 2006 +0000 @@ -245,10 +245,14 @@ { GaimPluginProtocolInfo *prpl_info = NULL; + g_return_if_fail(b != NULL); + g_return_if_fail(og != NULL); + g_return_if_fail(ng != NULL); + if (b->account->gc != NULL && b->account->gc->prpl != NULL) prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(b->account->gc->prpl); - if (b && b->account->gc && og && ng) { + if (b->account->gc && og && ng) { if (prpl_info && prpl_info->group_buddy) { prpl_info->group_buddy(b->account->gc, b->name, og->name, ng->name); }