| 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); |