fix for crash in background mode.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 2 Aug 2009 10:32:52 +0000 (10:32 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 2 Aug 2009 10:32:52 +0000 (10:32 +0000)
source/blender/windowmanager/intern/wm.c

index 1315737805712f02669ba15f8c1c84ab073dadfd..406541d62ba3f3e0004689893e4ec8d297f1c43b 100644 (file)
@@ -130,7 +130,7 @@ void WM_keymap_init(bContext *C)
 {
        wmWindowManager *wm= CTX_wm_manager(C);
 
-       if(CTX_py_init_get(C) && (wm->initialized & WM_INIT_KEYMAP) == 0) {
+       if(wm && CTX_py_init_get(C) && (wm->initialized & WM_INIT_KEYMAP) == 0) {
                wm_window_keymap(wm);
                ED_spacetypes_keymap(wm);