Mercurial > pidgin
changeset 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 | 9c83a731a3ea |
children | d856987c72ca |
files | src/conversation.c src/gtkconv.c |
diffstat | 2 files changed, 13 insertions(+), 9 deletions(-) [+] |
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;
--- a/src/gtkconv.c Mon Jan 20 21:54:46 2003 +0000 +++ b/src/gtkconv.c Mon Jan 20 22:39:39 2003 +0000 @@ -1650,8 +1650,7 @@ dnd_hints_hide_all(); - dest_win = gaim_gtkwin_get_at_xy(e->x_root, e->y_root); - dest_gtkwin = GAIM_GTK_WINDOW(dest_win); + dest_win = gaim_gtkwin_get_at_xy(e->x_root, e->y_root); conv = gaim_window_get_active_conversation(win); @@ -1673,6 +1672,8 @@ return TRUE; } + dest_gtkwin = GAIM_GTK_WINDOW(dest_win); + /* Get the destination notebook. */ dest_notebook = GTK_NOTEBOOK(gtkwin->notebook); @@ -3228,8 +3229,12 @@ { struct gaim_gtk_window *gtkwin = GAIM_GTK_WINDOW(win); + gaim_gtk_set_state_lock(TRUE); + gtk_widget_destroy(gtkwin->window); + gaim_gtk_set_state_lock(FALSE); + g_free(gtkwin); win->ui_data = NULL; }