Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-10 15:33:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-10 15:33:01 +0400
commit146a887b81b45ca92972e037976ccf9205da97ee (patch)
treed653061d043c5302dcf51645b1bb89b4b21cfa64 /source
parent1e85785704c8602ed90e2feae99b94735eec4d33 (diff)
2.5: Fix for crash on reload file. Cursor grab should not
assume there to be a window, but also reload file exec was not returing an OPERATOR_* value.
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c3
-rw-r--r--source/blender/windowmanager/intern/wm_files.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 5ddd8f5a1a9..79830aca12f 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -158,7 +158,8 @@ void WM_cursor_wait(int val)
void WM_cursor_grab(wmWindow *win, int val)
{
- GHOST_SetCursorGrab(win->ghostwin, val);
+ if(win)
+ GHOST_SetCursorGrab(win->ghostwin, val);
}
/* afer this you can call restore too */
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 29ec58befd9..51389ef890c 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -334,8 +334,8 @@ int WM_read_homefile(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_WM|ND_FILEREAD, NULL);
CTX_wm_window_set(C, NULL); /* exits queues */
-
- return success;
+
+ return OPERATOR_FINISHED;
}