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:
authorJeroen Bakker <jeroen@blender.org>2021-10-25 12:40:49 +0300
committerJeroen Bakker <jeroen@blender.org>2021-10-25 12:41:49 +0300
commit8e56f3e8a36d76ad1765f939c018a5ec3c01faab (patch)
tree6097a17b03b8619abd028fd9b5701033f798ce34 /source/blender
parentb3ca926aa8e1a2ea26dc5145cd361c211d786c63 (diff)
Image: Fix Crash During Undo.
Fixes T91294.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/image.c6
1 files changed, 5 insertions, 1 deletions
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);
}
}