From: Philip Chimento Date: Sun, 24 May 2009 11:48:59 +0000 (+0000) Subject: Checked for 0 window size in glk_window_move_cursor(). X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=commitdiff_plain;h=4ded9160286f4f84da74a85e1f1a3e9bd7fdfd18 Checked for 0 window size in glk_window_move_cursor(). git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@85 ddfedd41-794f-dd11-ae45-00112f111e67 --- 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) {