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>2022-05-09 10:54:26 +0300
committerJeroen Bakker <jeroen@blender.org>2022-05-09 10:54:26 +0300
commitcc3c15fbddc78bb5377571125cccf57ba7ec3b9a (patch)
treebecd78dc2427aebb8f85fd49fd0023ef2475d339 /source/blender
parent78e7b20c0f8dd2e76148f351ef1104375a4a1c94 (diff)
GPU: Fix crash deferred shader compilation.
On certain systems when eevee is used in a 3d viewport could crash. It happened more often on slower systems or systems with slower glsl compilers. For example an Intel Mac Mini. The cause was that even if a GPUMaterial was in used it could be freed.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index e8fb5fb2c45..7ec6ee5183a 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -168,6 +168,7 @@ static void gpu_material_free_single(GPUMaterial *material)
if (material->sss_tex_profile != NULL) {
GPU_texture_free(material->sss_tex_profile);
}
+ MEM_freeN(material);
}
void GPU_material_free(ListBase *gpumaterial)
@@ -176,7 +177,6 @@ void GPU_material_free(ListBase *gpumaterial)
GPUMaterial *material = link->data;
DRW_deferred_shader_remove(material);
gpu_material_free_single(material);
- MEM_freeN(material);
}
BLI_freelistN(gpumaterial);
}