From aa4a4d40727db29f43622cdfa7cc9eadbb5f839e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 17 Mar 2001 00:55:47 +0000 Subject: Added some debug messages.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1401 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-windows.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/fe-text/gui-windows.c') diff --git a/src/fe-text/gui-windows.c b/src/fe-text/gui-windows.c index 2a02dff2..a08c2612 100644 --- a/src/fe-text/gui-windows.c +++ b/src/fe-text/gui-windows.c @@ -207,6 +207,8 @@ void gui_window_newline(GUI_WINDOW_REC *gui, int visible) int lines; g_return_if_fail(gui != NULL); + g_return_if_fail(gui->bottom_startline != NULL); + g_return_if_fail(gui->startline != NULL); gui->xpos = 0; @@ -220,7 +222,10 @@ void gui_window_newline(GUI_WINDOW_REC *gui, int visible) lines = gui_window_get_linecount(gui, gui->startline->data); if (gui->subline >= lines) { /* after screen gets full after /CLEAR we end up here.. */ - gui->startline = gui->startline->next; + if (gui->startline->next == NULL) + g_warning("gui_window_newline(): bug #1"); + else + gui->startline = gui->startline->next; gui->subline = 0; } @@ -253,7 +258,10 @@ void gui_window_newline(GUI_WINDOW_REC *gui, int visible) if (lines > 1+gui->subline) gui->subline++; else { - gui->startline = gui->startline->next; + if (gui->startline->next == NULL) + g_warning("gui_window_newline(): bug #2"); + else + gui->startline = gui->startline->next; gui->subline = 0; } @@ -646,6 +654,10 @@ static void gui_window_scroll_down(GUI_WINDOW_REC *gui, int lines) break; } + if (gui->startline->next == NULL) { + g_warning("gui_window_scroll_down(): bug"); + break; + } gui->startline = gui->startline->next; } -- cgit v1.2.3