diff options
author | Ton Roosendaal <ton@blender.org> | 2013-01-17 19:27:58 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-01-17 19:27:58 +0400 |
commit | a896366ca9a8523932a86bebd9551e79d8fba1f8 (patch) | |
tree | a2bcf4721a2d9a3b4a2c8aec4fa7f44cd1c4b360 /source/blender/windowmanager/intern/wm_cursors.c | |
parent | b8116ed65992690c8a8d8c6eb3ab616546328c97 (diff) |
My bad - commit today for "Continuous Grab" fix ignored the comment that
bounds could be NULL :) Crash fixed.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_cursors.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 180b6b9c742..a1c7404a031 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -191,10 +191,12 @@ void WM_cursor_grab_enable(wmWindow *win, int wrap, int hide, int bounds[4]) float fac = GHOST_GetNativePixelSize(win->ghostwin); /* in case pixel coords differ from window/mouse coords */ - bounds[0] /= fac; - bounds[1] /= fac; - bounds[2] /= fac; - bounds[3] /= fac; + if (bounds) { + bounds[0] /= fac; + bounds[1] /= fac; + bounds[2] /= fac; + bounds[3] /= fac; + } if (hide) mode = GHOST_kGrabHide; else if (wrap) mode = GHOST_kGrabWrap; |