[Bf-blender-cvs] [0a2de0982eb] greasepencil-object: Small cleanup

Falk David noreply at git.blender.org
Mon Feb 7 18:35:15 CET 2022


Commit: 0a2de0982eba9e2974272a02adab3a0823c8973d
Author: Falk David
Date:   Thu Feb 3 19:08:27 2022 +0100
Branches: greasepencil-object
https://developer.blender.org/rB0a2de0982eba9e2974272a02adab3a0823c8973d

Small cleanup

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

M	source/blender/editors/gpencil/gpencil_undo.c

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

diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index 9ec863ce45e..d268535b391 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -534,13 +534,16 @@ static void gpencil_undosys_step_decode(struct bContext *C,
       data_iter = ((GPencilUndoStep *)us_iter)->undo_data;
     }
   }
-  else {
+  else if (dir == STEP_REDO) {
     if (undo_data->gpd_cache_data == NULL) {
       return;
     }
 
     gpencil_undo_data_to_gpencil_data(undo_data, gpd, true);
   }
+  else {
+    BLI_assert_unreachable();
+  }
 
   if (is_final) {
     gpd->flag |= GP_DATA_UPDATE_CACHE_DISPOSABLE;



More information about the Bf-blender-cvs mailing list