Checked for 0 window size in glk_window_move_cursor().
authorPhilip Chimento <philip.chimento@gmail.com>
Sun, 24 May 2009 11:48:59 +0000 (11:48 +0000)
committerPhilip Chimento <philip.chimento@gmail.com>
Sun, 24 May 2009 11:48:59 +0000 (11:48 +0000)
git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@85 ddfedd41-794f-dd11-ae45-00112f111e67

libchimara/window.c

index 223d7a24a71fca70089dbf43a97b80183bbed6fd..8b695315326629157e1dba292ca3b759818a0578 100644 (file)
@@ -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);
        
        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)
        {
        /* Calculate actual position if cursor is moved past the right edge */
        if(xpos >= win->width)
        {