Fix #129177: name 'bpy' is not defined at exit

Own regression in 1e55d034a1.
This commit is contained in:
Campbell Barton
2024-10-18 09:37:34 +11:00
parent faef1afb90
commit c072d42f6b

View File

@@ -534,7 +534,7 @@ void WM_exit_ex(bContext *C, const bool do_python_exit, const bool do_user_exit_
*/
if (C && CTX_py_init_get(C)) {
/* Calls `addon_utils.disable_all()` as well as unregistering all "startup" modules. */
const char *imports[] = {"bpy.utils", nullptr};
const char *imports[] = {"bpy", "bpy.utils", nullptr};
BPY_run_string_eval(C, imports, "bpy.utils._on_exit()");
}
#endif