Mercurial > pidgin
changeset 13634:8872789902a1
[gaim-migrate @ 16032]
Fix Coverity CID 135, don't dereference before the NULL check
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 15 Apr 2006 13:39:26 +0000 |
parents | c86c6f0505ea |
children | 2c84df43f126 |
files | src/protocols/msn/msn.c src/protocols/msn/session.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Fri Apr 14 19:08:59 2006 +0000 +++ b/src/protocols/msn/msn.c Sat Apr 15 13:39:26 2006 +0000 @@ -105,7 +105,7 @@ session = gc->proto_data; swboard = msn_session_get_swboard(session, gaim_conversation_get_name(conv), MSN_SB_FLAG_IM); - if (session == NULL || swboard == NULL) + if (swboard == NULL) return GAIM_CMD_RET_FAILED; msn_switchboard_send_msg(swboard, msg, TRUE);
--- a/src/protocols/msn/session.c Fri Apr 14 19:08:59 2006 +0000 +++ b/src/protocols/msn/session.c Sat Apr 15 13:39:26 2006 +0000 @@ -209,6 +209,8 @@ { MsnSwitchBoard *swboard; + g_return_val_if_fail(session != NULL, NULL); + swboard = msn_session_find_swboard(session, username); if (swboard == NULL)