summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-17 00:55:47 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-17 00:55:47 +0000
commitaa4a4d40727db29f43622cdfa7cc9eadbb5f839e (patch)
tree65609eadc01181dae6331f047d218878979afd2c /src
parent6806a0b7df585403cb55c1a95d3645c114708e37 (diff)
downloadirssi-aa4a4d40727db29f43622cdfa7cc9eadbb5f839e.zip
Added some debug messages..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1401 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/gui-windows.c16
1 files changed, 14 insertions, 2 deletions
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;
}