Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 13416:7d1ebac854ba | 13417:dc05405864bd |
|---|---|
| 243 */ | 243 */ |
| 244 void serv_move_buddy(GaimBuddy *b, GaimGroup *og, GaimGroup *ng) | 244 void serv_move_buddy(GaimBuddy *b, GaimGroup *og, GaimGroup *ng) |
| 245 { | 245 { |
| 246 GaimPluginProtocolInfo *prpl_info = NULL; | 246 GaimPluginProtocolInfo *prpl_info = NULL; |
| 247 | 247 |
| 248 g_return_if_fail(b != NULL); | |
| 249 g_return_if_fail(og != NULL); | |
| 250 g_return_if_fail(ng != NULL); | |
| 251 | |
| 248 if (b->account->gc != NULL && b->account->gc->prpl != NULL) | 252 if (b->account->gc != NULL && b->account->gc->prpl != NULL) |
| 249 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(b->account->gc->prpl); | 253 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(b->account->gc->prpl); |
| 250 | 254 |
| 251 if (b && b->account->gc && og && ng) { | 255 if (b->account->gc && og && ng) { |
| 252 if (prpl_info && prpl_info->group_buddy) { | 256 if (prpl_info && prpl_info->group_buddy) { |
| 253 prpl_info->group_buddy(b->account->gc, b->name, og->name, ng->name); | 257 prpl_info->group_buddy(b->account->gc, b->name, og->name, ng->name); |
| 254 } | 258 } |
| 255 } | 259 } |
| 256 } | 260 } |
