[Bf-blender-cvs] [9def00a8ca8] master: Work around T86015: Crash undoing in certain scenario (disabling Global Undo).

Bastien Montagne noreply at git.blender.org
Mon Mar 1 11:29:51 CET 2021


Commit: 9def00a8ca8307c28ba064dbf80869ab00235711
Author: Bastien Montagne
Date:   Mon Mar 1 11:27:24 2021 +0100
Branches: master
https://developer.blender.org/rB9def00a8ca8307c28ba064dbf80869ab00235711

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.).

===================================================================

M	source/blender/editors/undo/memfile_undo.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list