Mercurial > pidgin
changeset 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 | 7d1ebac854ba |
children | ad33debf87b4 |
files | src/server.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
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); }