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.
This commit is contained in:
parent
55c29e36dc
commit
87aa456ea5
Notes:
blender-bot
2023-02-14 03:55:10 +01:00
Referenced by issue #61172, Undo: texture paint redo crashes Referenced by issue #60954, Texture Paint behaving weird on Ctrl + Z sometimes
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue