Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-04-22 14:08:58 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-04-22 14:08:58 +0400
commit53479be58105155c319b7862c0e2c2d45415846d (patch)
tree53a6b6d8a48d8cc7f6fc6ee11430c099d4ee7f32 /source/blender/blenloader
parentf3dbfddc8a0eac54b57d39a3c8c92c0155ecacd1 (diff)
Fix #35037: Compositor: MultilayerEXR + undo loses image. Crash when selecting in Image Editor
Issue was cause dby ima->ibufs being stored in a ma on undo/redo and ima->rr not. In case of multilayer image ibufs hares pointer with render result, so current undo/redo policy lead to a dead pointer stored in ibuf. Made it so ima->rr also stores in the map and restores on redo/undo keeping all the pointers fine.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 07230736124..806ca280789 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1315,6 +1315,8 @@ void blo_make_image_pointer_map(FileData *fd, Main *oldmain)
oldnewmap_insert(fd->imamap, ibuf, ibuf, 0);
if (ima->gputexture)
oldnewmap_insert(fd->imamap, ima->gputexture, ima->gputexture, 0);
+ if (ima->rr)
+ oldnewmap_insert(fd->imamap, ima->rr, ima->rr, 0);
for (a=0; a < IMA_MAX_RENDER_SLOT; a++)
if (ima->renders[a])
oldnewmap_insert(fd->imamap, ima->renders[a], ima->renders[a], 0);
@@ -1356,12 +1358,14 @@ void blo_end_image_pointer_map(FileData *fd, Main *oldmain)
ima->bindcode = 0;
ima->tpageflag &= ~IMA_GLBIND_IS_DATA;
ima->gputexture = NULL;
+ ima->rr = NULL;
}
}
for (i = 0; i < IMA_MAX_RENDER_SLOT; i++)
ima->renders[i] = newimaadr(fd, ima->renders[i]);
ima->gputexture = newimaadr(fd, ima->gputexture);
+ ima->rr = newimaadr(fd, ima->rr);
}
for (; sce; sce = sce->id.next) {
if (sce->nodetree && sce->nodetree->previews) {
@@ -3278,10 +3282,10 @@ static void direct_link_image(FileData *fd, Image *ima)
ima->bindcode = 0;
ima->tpageflag &= ~IMA_GLBIND_IS_DATA;
ima->gputexture = NULL;
+ ima->rr = NULL;
}
ima->anim = NULL;
- ima->rr = NULL;
ima->repbind = NULL;
/* undo system, try to restore render buffers */