# HG changeset patch # User Christian Hammond # Date 1043102379 0 # Node ID 7e1fb422e5fd8d52ad4f32e98d8eac16a1a24698 # Parent 9c83a731a3ea20049a283b7464868a419e2bb64b [gaim-migrate @ 4635] Fixes a couple crash bugs. We're getting there! committer: Tailor Script diff -r 9c83a731a3ea -r 7e1fb422e5fd src/conversation.c --- 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; diff -r 9c83a731a3ea -r 7e1fb422e5fd src/gtkconv.c --- 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; }