From 0b9a65151d9fc0c7e4ec273da7e4bcc3b09a6d18 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Jan 2019 21:33:01 +1100 Subject: Fix T60410: Crash adjusting torus w/ enter edit-mode preference --- source/blender/editors/undo/memfile_undo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/undo') diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c index 2470acef9aa..1560c414c42 100644 --- a/source/blender/editors/undo/memfile_undo.c +++ b/source/blender/editors/undo/memfile_undo.c @@ -38,8 +38,7 @@ #include "ED_object.h" #include "ED_undo.h" -#include "ED_render.h" - +#include "ED_util.h" #include "../blenloader/BLO_undofile.h" @@ -82,6 +81,9 @@ static bool memfile_undosys_step_encode(struct bContext *C, UndoStep *us_p) static void memfile_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNUSED(dir)) { + struct Main *bmain = CTX_data_main(C); + ED_editors_exit(bmain, false); + MemFileUndoStep *us = (MemFileUndoStep *)us_p; BKE_memfile_undo_decode(us->data, C); -- cgit v1.2.3