[Bf-blender-cvs] [8e56f3e8a36] master: Image: Fix Crash During Undo.
Jeroen Bakker
noreply at git.blender.org
Mon Oct 25 11:41:52 CEST 2021
Commit: 8e56f3e8a36d76ad1765f939c018a5ec3c01faab
Author: Jeroen Bakker
Date: Mon Oct 25 11:40:49 2021 +0200
Branches: master
https://developer.blender.org/rB8e56f3e8a36d76ad1765f939c018a5ec3c01faab
Image: Fix Crash During Undo.
Fixes T91294.
===================================================================
M source/blender/blenkernel/intern/image.c
===================================================================
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 5ae338aaaeb..3800cbec94b 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -211,8 +211,12 @@ static void image_foreach_cache(ID *id,
for (int eye = 0; eye < 2; eye++) {
for (int a = 0; a < TEXTARGET_COUNT; a++) {
for (int resolution = 0; resolution < IMA_TEXTURE_RESOLUTION_LEN; resolution++) {
+ GPUTexture *texture = image->gputexture[a][eye][resolution];
+ if (texture == NULL) {
+ continue;
+ }
key.offset_in_ID = offsetof(Image, gputexture[a][eye][resolution]);
- key.cache_v = image->gputexture[a][eye];
+ key.cache_v = texture;
function_callback(id, &key, (void **)&image->gputexture[a][eye][resolution], 0, user_data);
}
}
More information about the Bf-blender-cvs
mailing list