From 9def00a8ca8307c28ba064dbf80869ab00235711 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 1 Mar 2021 11:27:24 +0100 Subject: Work around T86015: Crash undoing in certain scenario (disabling Global Undo). Simply disable advanced 're-use current blend data` process when loading a memfile step and Global Undo is disabled, since there is no way to ensure we have a proper 'differential' state in the stack then. NOTE: this is a quick work-around to fix the crash, not a satisfying solution by far (pretty sure there can still be crashes if you then re-enable Global Undo afterwards e.g.). --- source/blender/editors/undo/memfile_undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c index 4fd8c180a4b..9189adaf4d1 100644 --- a/source/blender/editors/undo/memfile_undo.c +++ b/source/blender/editors/undo/memfile_undo.c @@ -152,7 +152,7 @@ static void memfile_undosys_step_decode(struct bContext *C, bool use_old_bmain_data = true; - if (USER_EXPERIMENTAL_TEST(&U, use_undo_legacy)) { + if (USER_EXPERIMENTAL_TEST(&U, use_undo_legacy) || !(U.uiflag & USER_GLOBALUNDO)) { use_old_bmain_data = false; } else if (undo_direction == STEP_REDO) { -- cgit v1.2.3