Mercurial > pidgin
changeset 5899:349204c9a709
[gaim-migrate @ 6331]
Sending MSN buddy icons back and forth no longer crashes. More checks in place
for bad things that can happen.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 15 Jun 2003 20:12:05 +0000 |
parents | 5baeb89ee2d4 |
children | faf4363e56a8 |
files | src/protocols/msn/servconn.c |
diffstat | 1 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/servconn.c Sun Jun 15 19:57:23 2003 +0000 +++ b/src/protocols/msn/servconn.c Sun Jun 15 20:12:05 2003 +0000 @@ -421,6 +421,7 @@ msn_servconn_parse_data(gpointer data, gint source, GaimInputCondition cond) { MsnServConn *servconn = (MsnServConn *)data; + MsnSession *session = servconn->session; char buf[MSN_BUF_LEN]; gboolean cont = TRUE; int len; @@ -465,9 +466,18 @@ process_multi_line(servconn, msg); - servconn->msg_len = 0; - g_free(servconn->msg_passport); - g_free(servconn->msg_friendly); + if (g_list_find(session->servconns, servconn) != NULL) { + servconn->msg_len = 0; + + if (servconn->msg_passport != NULL) + g_free(servconn->msg_passport); + + if (servconn->msg_friendly != NULL) + g_free(servconn->msg_friendly); + } + else + cont = 0; + g_free(msg); } else {