From e403244a2d10f82862d88c24dbceeed02874fba9 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 1 Jun 2001 19:12:07 +0000 Subject: [PATCH] Resizing window destroyed curses window, but didn't update the view's curses window which kept using the old one, and probably crashed soon. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1532 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/mainwindows.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index d727464e..72977598 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -84,6 +84,9 @@ static void mainwindow_resize(MAIN_WINDOW_REC *window, int xdiff, int ydiff) #else delwin(window->curses_win); create_curses_window(window); + + textbuffer_view_set_window(WINDOW_GUI(window->active)->view, + window->curses_win); #endif #endif @@ -234,13 +237,13 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window) { g_return_if_fail(window != NULL); + mainwindows = g_slist_remove(mainwindows, window); + signal_emit("mainwindow destroyed", 1, window); + #ifdef USE_CURSES_WINDOWS delwin(window->curses_win); #endif - mainwindows = g_slist_remove(mainwindows, window); - signal_emit("mainwindow destroyed", 1, window); - if (!quitting && mainwindows != NULL) { gui_windows_remove_parent(window); mainwindows_add_space(window->first_line, window->last_line+window->statusbar_lines); @@ -248,6 +251,7 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window) mainwindows_redraw(); statusbar_redraw(NULL); } + g_free(window); if (active_mainwin == window) active_mainwin = NULL;