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:
authorDalai Felinto <dfelinto@gmail.com>2017-07-11 12:00:46 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-07-11 12:02:56 +0300
commit2325d15d02e9e0b1fda2586ad5ffbe8364e706f4 (patch)
tree62cfc8ff32d719d3e1f29291e168d65844cee32f /source/blender/gpu/intern/gpu_lamp.c
parent64dd9a117dfabad1a9372d34e8804e7ec1ad9828 (diff)
Lamps should not have their own gpu material
This was leading to multiple crashes when freeing the lamps or materials when opening old files. Follow up on b50839038d6b3d2.
Diffstat (limited to 'source/blender/gpu/intern/gpu_lamp.c')
-rw-r--r--source/blender/gpu/intern/gpu_lamp.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/source/blender/gpu/intern/gpu_lamp.c b/source/blender/gpu/intern/gpu_lamp.c
index 12b9eaf22f8..8bf343568b1 100644
--- a/source/blender/gpu/intern/gpu_lamp.c
+++ b/source/blender/gpu/intern/gpu_lamp.c
@@ -386,21 +386,10 @@ void GPU_lamp_free(Object *ob)
{
GPULamp *lamp;
LinkData *link;
- LinkData *nlink;
- Material *ma;
for (link = ob->gpulamp.first; link; link = link->next) {
lamp = link->data;
- while (lamp->materials.first) {
- nlink = lamp->materials.first;
- ma = nlink->data;
- BLI_freelinkN(&lamp->materials, nlink);
-
- if (ma->gpumaterial.first)
- GPU_material_free(&ma->gpumaterial);
- }
-
gpu_lamp_shadow_free(lamp);
GPU_lamp_engine_data_free(&lamp->data);