fix for crash when setting the cursor in background mode.

This commit is contained in:
Campbell Barton 2013-06-28 16:37:39 +00:00
parent 86515e5086
commit 5d413b523a
3 changed files with 5 additions and 3 deletions

@ -2901,7 +2901,7 @@ typedef struct ReconstructProgressData {
int message_size; int message_size;
} ReconstructProgressData; } 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) static struct libmv_Tracks *libmv_tracks_new(ListBase *tracksbase, int width, int height)
{ {
int tracknr = 0; int tracknr = 0;

@ -129,7 +129,7 @@ static int script_reload_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_WINDOW, NULL); WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED; return OPERATOR_FINISHED;
#else #else
(void)C; /* unused */ (void)C, (void)op; /* unused */
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
#endif #endif
} }

@ -107,7 +107,9 @@ static BCursor *BlenderCursor[BC_NUMCURSORS]; /*Points to static BCursor Structs
void WM_cursor_set(wmWindow *win, int curs) 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) { if (curs == CURSOR_NONE) {
GHOST_SetCursorVisibility(win->ghostwin, 0); GHOST_SetCursorVisibility(win->ghostwin, 0);