diff -r 261443b20679 -r 257978b5df5b src/protocols/msn/slpmsg.c --- a/src/protocols/msn/slpmsg.c Wed Dec 01 01:17:46 2004 +0000 +++ b/src/protocols/msn/slpmsg.c Wed Dec 01 02:30:47 2004 +0000 @@ -65,10 +65,20 @@ if (slpmsg->msg != NULL) { - if (slpmsg->msg->trans != NULL) + MsnTransaction *trans; + + trans = slpmsg->msg->trans; + + if (trans != NULL) { - slpmsg->msg->trans->callbacks = NULL; - slpmsg->msg->trans->data = NULL; + /* Something is pointing to this slpmsg, so we should remove that + * pointer to prevent a crash. */ + + if (trans->callbacks != NULL && trans->has_custom_callbacks) + g_hash_table_destroy(trans->callbacks); + + trans->callbacks = NULL; + trans->data = NULL; } }