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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index db6117d854b..46df003cbbc 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1362,10 +1362,14 @@ static void gpu_lamp_from_blender(Scene *scene, Object *ob, Object *par, Lamp *l
static void gpu_lamp_shadow_free(GPULamp *lamp)
{
- if(lamp->tex)
+ if(lamp->tex) {
GPU_texture_free(lamp->tex);
- if(lamp->fb)
+ lamp->tex= NULL;
+ }
+ if(lamp->fb) {
GPU_framebuffer_free(lamp->fb);
+ lamp->fb= NULL;
+ }
}
GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)