From 4ded9160286f4f84da74a85e1f1a3e9bd7fdfd18 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sun, 24 May 2009 11:48:59 +0000 Subject: [PATCH 1/1] 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 --- libchimara/window.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.30.2