Fix T60809: Crash undoing object rename in edit-mode
[blender.git] / source / blender / blenkernel / BKE_undo_system.h
index 05093deec702aabba97f4bf071cd66353c0610da..dc8cabc52c721d179c9dc4ddded818bb3a124aea 100644 (file)
@@ -49,6 +49,11 @@ UNDO_REF_ID_TYPE(Text);
 typedef struct UndoStack {
        ListBase         steps;
        struct UndoStep *step_active;
+       /**
+        * The last memfile state read, used so we can be sure the names from the
+        * library state matches the state an undo step was written in.
+        */
+       struct UndoStep *step_active_memfile;
 
        /**
         * Some undo systems require begin/end, see: #UndoType.step_encode_init
@@ -135,6 +140,7 @@ extern const UndoType *BKE_UNDOSYS_TYPE_TEXT;
 UndoStack      *BKE_undosys_stack_create(void);
 void            BKE_undosys_stack_destroy(UndoStack *ustack);
 void            BKE_undosys_stack_clear(UndoStack *ustack);
+void            BKE_undosys_stack_clear_active(UndoStack *ustack);
 bool            BKE_undosys_stack_has_undo(UndoStack *ustack, const char *name);
 void            BKE_undosys_stack_init_from_main(UndoStack *ustack, struct Main *bmain);
 void            BKE_undosys_stack_init_from_context(UndoStack *ustack, struct bContext *C);