[Bf-blender-cvs] [db6f3eb5051] undo-experiments: undoexp: cleanup: move/tweak assert re undo direction value.

Bastien Montagne noreply at git.blender.org
Sat Feb 1 19:43:51 CET 2020


Commit: db6f3eb50512a2625a76032e2ae905c2a15c994f
Author: Bastien Montagne
Date:   Fri Jan 31 15:55:41 2020 +0100
Branches: undo-experiments
https://developer.blender.org/rBdb6f3eb50512a2625a76032e2ae905c2a15c994f

undoexp: cleanup: move/tweak assert re undo direction value.

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

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 d50aa549dfc..7d143864624 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -145,6 +145,8 @@ static void memfile_undosys_step_decode(struct bContext *C,
                                         int undo_direction,
                                         bool UNUSED(is_final))
 {
+  BLI_assert(undo_direction != 0);
+
   bool use_old_bmain_data = true;
 
   if (undo_direction > 0) {
@@ -168,7 +170,6 @@ static void memfile_undosys_step_decode(struct bContext *C,
      * memfile, since changes might have been flushed to current bmain data without triggering any
      * memfile step storage (typical common case e.g. when using edit modes).
      */
-    BLI_assert(undo_direction < 0);
     UndoStep *us_next = us_p->next;
     if (us_next != NULL) {
       if (us_next->use_old_bmain_data == false) {



More information about the Bf-blender-cvs mailing list