From a896366ca9a8523932a86bebd9551e79d8fba1f8 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 17 Jan 2013 15:27:58 +0000 Subject: My bad - commit today for "Continuous Grab" fix ignored the comment that bounds could be NULL :) Crash fixed. --- source/blender/windowmanager/intern/wm_cursors.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_cursors.c') 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; -- cgit v1.2.3