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>2018-04-14 15:04:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-14 15:10:27 +0300
commit35785ee7cbc84aad1d6633c9c4a59395ccd71f73 (patch)
tree33d38c56b73a0513f7a39763029381ad372a0bf1 /source/blender/editors/undo
parentb107e77e46c17693a07c31cf1a678b3a3d914672 (diff)
parent66d4e9300bd8b4be4f1d759146a92df7fd3230a1 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r--source/blender/editors/undo/memfile_undo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c
index f4ed96f98f3..511f4bc72f1 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -70,9 +70,10 @@ static bool memfile_undosys_step_encode(struct bContext *C, UndoStep *us_p)
/* Important we only use 'main' from the context (see: BKE_undosys_stack_init_from_main). */
struct Main *bmain = CTX_data_main(C);
+ UndoStack *ustack = ED_undo_stack_get();
/* can be NULL, use when set. */
- MemFileUndoStep *us_prev = (MemFileUndoStep *)BKE_undosys_step_same_type_prev(us_p);
+ MemFileUndoStep *us_prev = (MemFileUndoStep *)BKE_undosys_step_find_by_type(ustack, BKE_UNDOSYS_TYPE_MEMFILE);
us->data = BKE_memfile_undo_encode(bmain, us_prev ? us_prev->data : NULL);
us->step.data_size = us->data->undo_size;