diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-10-11 22:52:36 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-10-11 22:52:36 +0400 |
commit | 5bd1bb4899ee6f12435286403779e5b23325a4d6 (patch) | |
tree | 72d8eb31fa7ee5af5f5a39a332625a6bcf2b23e5 | |
parent | ec7407f94217cc65f5ec98774160d40f21c6b030 (diff) |
Fix for bug #17809: crash with glsl materials and nodes refresh,
didn't attach to the right materials to the lamp.
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 6dff5802c31..62c3f848284 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -693,7 +693,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la shr->spec, &shr->spec); add_user_list(&mat->lamps, lamp); - add_user_list(&lamp->materials, ma); + add_user_list(&lamp->materials, shi->gpumat->ma); return; } @@ -702,7 +702,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la } else if((G.fileflags & G_FILE_GLSL_NO_SHADOWS) && (lamp->mode & LA_ONLYSHADOW)) { add_user_list(&mat->lamps, lamp); - add_user_list(&lamp->materials, ma); + add_user_list(&lamp->materials, shi->gpumat->ma); return; } else @@ -755,7 +755,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la } add_user_list(&mat->lamps, lamp); - add_user_list(&lamp->materials, ma); + add_user_list(&lamp->materials, shi->gpumat->ma); } static void material_lights(GPUShadeInput *shi, GPUShadeResult *shr) |