fix for crash when setting the cursor in background mode.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 28 Jun 2013 16:37:39 +0000 (16:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 28 Jun 2013 16:37:39 +0000 (16:37 +0000)
source/blender/blenkernel/intern/tracking.c
source/blender/editors/space_script/script_edit.c
source/blender/windowmanager/intern/wm_cursors.c

index c073c716ec699f87c49e5817774840b2f6ccd3e9..8141fc8aaa189e6bc35ee117be66b864538d3039 100644 (file)
@@ -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;
index ddf2bd27513f82bcd61b352d515fa53b9f7b46f6..9df849410f42edb171e04a090671800bbc21b877 100644 (file)
@@ -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
 }
index fa7e4afc68c8d555c20b99be5d00e27fc60ace4f..515f80b0adead7412397557467518f13a11e8afb 100644 (file)
@@ -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);