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:
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r--source/blender/editors/undo/memfile_undo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c
index dc1870c2d19..0180b3dde81 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -93,6 +93,10 @@ static void memfile_undosys_step_decode(struct bContext *C, struct Main *bmain,
MemFileUndoStep *us = (MemFileUndoStep *)us_p;
BKE_memfile_undo_decode(us->data, C);
+ /* bmain has been freed. */
+ bmain = CTX_data_main(C);
+ ED_editors_init_for_undo(bmain);
+
WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, CTX_data_scene(C));
}