From 5d413b523a92ee70245a43568cc350dd56fa42e4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 28 Jun 2013 16:37:39 +0000 Subject: fix for crash when setting the cursor in background mode. --- source/blender/blenkernel/intern/tracking.c | 2 +- source/blender/editors/space_script/script_edit.c | 2 +- source/blender/windowmanager/intern/wm_cursors.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index c073c716ec6..8141fc8aaa1 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2901,7 +2901,7 @@ typedef struct ReconstructProgressData { int message_size; } ReconstructProgressData; -/* Create mew libmv Tracks structure from blender's tracks list. */ +/* Create new libmv Tracks structure from blender's tracks list. */ static struct libmv_Tracks *libmv_tracks_new(ListBase *tracksbase, int width, int height) { int tracknr = 0; diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index ddf2bd27513..9df849410f4 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -129,7 +129,7 @@ static int script_reload_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_WINDOW, NULL); return OPERATOR_FINISHED; #else - (void)C; /* unused */ + (void)C, (void)op; /* unused */ return OPERATOR_CANCELLED; #endif } diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index fa7e4afc68c..515f80b0ade 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -107,7 +107,9 @@ static BCursor *BlenderCursor[BC_NUMCURSORS]; /*Points to static BCursor Structs void WM_cursor_set(wmWindow *win, int curs) { - if (win == NULL) return; /* Can't set custom cursor before Window init */ + if (win == NULL || G.background) { + return; /* Can't set custom cursor before Window init */ + } if (curs == CURSOR_NONE) { GHOST_SetCursorVisibility(win->ghostwin, 0); -- cgit v1.2.3