Mercurial > pidgin
diff src/conversation.c @ 4369:7e1fb422e5fd
[gaim-migrate @ 4635]
Fixes a couple crash bugs. We're getting there!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 20 Jan 2003 22:39:39 +0000 |
parents | 65d98b565fbe |
children | dcc6c130c6d9 |
line wrap: on
line diff
--- a/src/conversation.c Mon Jan 20 21:54:46 2003 +0000 +++ b/src/conversation.c Mon Jan 20 22:39:39 2003 +0000 @@ -447,9 +447,6 @@ ops = gaim_window_get_ops(win); - if (ops != NULL && ops->destroy_window != NULL) - ops->destroy_window(win); - for (node = g_list_first(gaim_window_get_conversations(win)); node != NULL; node = g_list_next(node)) @@ -464,6 +461,9 @@ node->data = NULL; } + if (ops != NULL && ops->destroy_window != NULL) + ops->destroy_window(win); + g_list_free(gaim_window_get_conversations(win)); windows = g_list_remove(windows, win); @@ -589,9 +589,8 @@ { struct gaim_window_ops *ops; - if (win == NULL || conv == NULL) { + if (win == NULL || conv == NULL) return -1; - } if (gaim_conversation_get_window(conv) != NULL) { gaim_window_remove_conversation( @@ -607,13 +606,13 @@ conv->conversation_pos = win->conversation_count - 1; if (ops != NULL) { + conv->window = win; + if (ops->get_conversation_ops != NULL) gaim_conversation_set_ops(conv, ops->get_conversation_ops()); if (ops->add_conversation != NULL) ops->add_conversation(win, conv); - - conv->window = win; } return win->conversation_count - 1;