Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-29 06:31:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-29 07:29:22 +0300
commit78719abc01f11fee9652711ca64f83d0c777bb4f (patch)
treed285407380e6371b2ade57b332f9ea51ced5a2b3 /source/blender/blenkernel/BKE_undo_system.h
parent59a0a143ddb50e2835125a69f20e597f5dab4d91 (diff)
Fix T60809: Crash undoing object rename in edit-mode
Currently names are used for edit-mode undo-steps, any changes to Main ID names cause lookup failure (crashing). This commit ensures any undo steps that use ID lookups have the same mem-file undo state loaded that was used to encode the steps. Renaming also has an undo push added (last commit).
Diffstat (limited to 'source/blender/blenkernel/BKE_undo_system.h')
-rw-r--r--source/blender/blenkernel/BKE_undo_system.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_undo_system.h b/source/blender/blenkernel/BKE_undo_system.h
index a75606a17cb..dc8cabc52c7 100644
--- a/source/blender/blenkernel/BKE_undo_system.h
+++ b/source/blender/blenkernel/BKE_undo_system.h
@@ -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