diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-31 04:01:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-31 04:07:13 +0300 |
commit | 8c89790674901748cf04771dc2c5453815db1607 (patch) | |
tree | 1080bd2f35fe1d9260b63efb9e12f31a9b152835 /source/blender/editors/undo | |
parent | 51bba03b319319d59f739673c3fafb71bc308e0d (diff) |
Fix T60660: Texture paint undo removes image
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r-- | source/blender/editors/undo/memfile_undo.c | 4 |
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)); } |