diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-06 10:39:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-06 10:39:35 +0300 |
commit | a9f92366709782a1bfdabdd0ec26383be60a6341 (patch) | |
tree | 5761f1b4d41c712e8e9771aeb1138035324298d2 /source/blender/blenkernel/intern | |
parent | ab375079df06de112fc7697ebfe626903b7da97e (diff) | |
parent | bfbd85e9d66be3793e51ef989f793bdd69214493 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/blender_undo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c index 371d9dff8d5..857fc72672c 100644 --- a/source/blender/blenkernel/intern/blender_undo.c +++ b/source/blender/blenkernel/intern/blender_undo.c @@ -83,13 +83,14 @@ bool BKE_memfile_undo_decode(MemFileUndoData *mfu, bContext *C) success = BKE_blendfile_read_from_memfile(C, &mfu->memfile, NULL, 0); } - /* restore */ - BLI_strncpy(bmain->name, mainstr, sizeof(bmain->name)); /* restore */ + /* Restore, bmain has been re-allocated. */ + bmain = CTX_data_main(C); + BLI_strncpy(bmain->name, mainstr, sizeof(bmain->name)); G.fileflags = fileflags; if (success) { /* important not to update time here, else non keyed tranforms are lost */ - DEG_on_visible_update(G.main, false); + DEG_on_visible_update(bmain, false); } return success; |