CMake: fix WITH_PYTHON=OFF
authorCampbell Barton <ideasman42@gmail.com>
Mon, 15 Apr 2019 06:40:15 +0000 (08:40 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 15 Apr 2019 06:40:29 +0000 (08:40 +0200)
source/blender/windowmanager/intern/wm.c

index 8e01094..a05dce9 100644 (file)
@@ -219,9 +219,11 @@ void WM_operator_handlers_clear(wmWindowManager *wm, wmOperatorType *ot)
 void WM_keyconfig_reload(bContext *C)
 {
        if (CTX_py_init_get(C) && !G.background) {
+#ifdef WITH_PYTHON
                BPY_execute_string(
                        C, (const char *[]){"bpy", NULL},
                        "bpy.utils.keyconfig_init()");
+#endif
        }
 }