Fix for crash when doing File -> Open, File -> New (without closing the FileBrowser first)

This commit is contained in:
Joshua Leung 2009-10-25 05:33:35 +00:00
parent c90e05bb42
commit 3af9333251

@ -181,7 +181,7 @@ void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds)
void WM_cursor_ungrab(wmWindow *win)
{
if ((G.f & G_DEBUG) == 0)
if(win)
if(win && win->ghostwin)
GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, NULL);
}