Fix saving a quit.blend on exit when a file failed to load

When a file passed in from the command line failed to load,
blender would exit & save the quit.blend.

Resolve by adding a `do_user_exit_actions` to WM_exit_ex which is
false in backgrounds mode or when an error has occurred.
This commit is contained in:
Campbell Barton
2023-05-30 13:24:18 +10:00
parent 9a4fb83fdb
commit c803ddab29
4 changed files with 24 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ static PyObject *bpy_atexit(PyObject *UNUSED(self), PyObject *UNUSED(args), PyOb
/* close down enough of blender at least not to crash */
struct bContext *C = BPY_context_get();
WM_exit_ex(C, false);
WM_exit_ex(C, false, false);
Py_RETURN_NONE;
}