diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-04 11:50:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-04 11:53:09 +0300 |
commit | 87aa456ea516f49c6029cf30f8f0dff16cbb58bc (patch) | |
tree | 7c64ee88f8fe1241c9ba1cd1fbac96b889db8a7f /source/blender/blenloader | |
parent | 55c29e36dccddc7ae8c6512b6dec074437214097 (diff) |
Fix T61172: Crash in texture paint undo/redo
Mixing texture paint undo w/ memfile undo was crashing.
The gputextures and render result are written to the FileData.imamap
but weren't read back.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ba4bebf1bd9..2723210781f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3938,6 +3938,12 @@ static void direct_link_image(FileData *fd, Image *ima) } ima->rr = NULL; } + else { + for (int i = 0; i < TEXTARGET_COUNT; i++) { + ima->gputexture[i] = newimaadr(fd, ima->gputexture[i]); + } + ima->rr = newimaadr(fd, ima->rr); + } /* undo system, try to restore render buffers */ link_list(fd, &(ima->renderslots)); |