From: fliep Date: Sun, 24 May 2009 11:48:59 +0000 (+0000) Subject: Checked for 0 window size in glk_window_move_cursor(). X-Git-Tag: v0.9~380 X-Git-Url: https://git.stderr.nl/gitweb?p=projects%2Fchimara%2Fchimara.git;a=commitdiff_plain;h=37f81c7f91d33c5f4d5a181fe7e3e47d67c5ff3d Checked for 0 window size in glk_window_move_cursor(). --- diff --git a/libchimara/window.c b/libchimara/window.c index 223d7a2..8b69531 100644 --- a/libchimara/window.c +++ b/libchimara/window.c @@ -1193,6 +1193,10 @@ glk_window_move_cursor(winid_t win, glui32 xpos, glui32 ypos) VALID_WINDOW(win, return); g_return_if_fail(win->type == wintype_TextGrid); + /* Don't do anything if the window is shrunk down to nothing */ + if(win->width == 0 || win->height == 0) + return; + /* Calculate actual position if cursor is moved past the right edge */ if(xpos >= win->width) {