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:
authorJoshua Leung <aligorith@gmail.com>2007-09-17 09:00:36 +0400
committerJoshua Leung <aligorith@gmail.com>2007-09-17 09:00:36 +0400
commit01caa9179d9981ceb45130e8e30ffc695d03d8b5 (patch)
tree6359a4ecee8f2403c40fb975083856f1d5c90502 /source/blender/src/buttons_shading.c
parent976a0424e1edd9dd83b8ff8427d2b7c69f846a2a (diff)
Bugfix #7360:
In svn-trunk, deleting a lamp crashed when the Lamp Buttons were active. Also, removed and old duplicate variable.
Diffstat (limited to 'source/blender/src/buttons_shading.c')
-rw-r--r--source/blender/src/buttons_shading.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index b11e3bc006d..a26ef722a10 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -4023,9 +4023,10 @@ void material_panels()
void lamp_panels()
{
Object *ob= OBACT;
- Lamp *la = ob->data;
+ Lamp *la;
if(ob==NULL || ob->type!= OB_LAMP) return;
+ la= ob->data;
lamp_panel_preview(ob, ob->data);
lamp_panel_lamp(ob, ob->data);
@@ -4038,14 +4039,13 @@ void lamp_panels()
lamp_panel_spot(ob, ob->data);
else {
/* init vars */
- Lamp* lp = ob->data;
- if (lp->YF_numphotons==0) lp->YF_numphotons=1000;
- if (lp->YF_numsearch==0) lp->YF_numsearch=10;
- if (lp->YF_phdepth==0) lp->YF_phdepth=1;
- if (lp->YF_causticblur==0.0) lp->YF_causticblur=0.001;
- if (lp->YF_bufsize==0) lp->YF_bufsize=128;
+ if (la->YF_numphotons==0) la->YF_numphotons=1000;
+ if (la->YF_numsearch==0) la->YF_numsearch=10;
+ if (la->YF_phdepth==0) la->YF_phdepth=1;
+ if (la->YF_causticblur==0.0) la->YF_causticblur=0.001;
+ if (la->YF_bufsize==0) la->YF_bufsize=128;
/* spherelight radius default is zero, so nothing to do */
- lamp_panel_yafray(ob, lp);
+ lamp_panel_yafray(ob, la);
}
lamp_panel_texture(ob, ob->data);
lamp_panel_mapto(ob, ob->data);