src/protocols/msn/slpmsg.c

changeset 10284
257978b5df5b
parent 10225
0dfea1bc8695
child 10306
c2ad3e682684
equal deleted inserted replaced
10283:261443b20679 10284:257978b5df5b
63 */ 63 */
64 #endif 64 #endif
65 65
66 if (slpmsg->msg != NULL) 66 if (slpmsg->msg != NULL)
67 { 67 {
68 if (slpmsg->msg->trans != NULL) 68 MsnTransaction *trans;
69
70 trans = slpmsg->msg->trans;
71
72 if (trans != NULL)
69 { 73 {
70 slpmsg->msg->trans->callbacks = NULL; 74 /* Something is pointing to this slpmsg, so we should remove that
71 slpmsg->msg->trans->data = NULL; 75 * pointer to prevent a crash. */
76
77 if (trans->callbacks != NULL && trans->has_custom_callbacks)
78 g_hash_table_destroy(trans->callbacks);
79
80 trans->callbacks = NULL;
81 trans->data = NULL;
72 } 82 }
73 } 83 }
74 84
75 slplink->slp_msgs = 85 slplink->slp_msgs =
76 g_list_remove(slplink->slp_msgs, slpmsg); 86 g_list_remove(slplink->slp_msgs, slpmsg);

mercurial