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:
authorTon Roosendaal <ton@blender.org>2005-12-04 19:15:04 +0300
committerTon Roosendaal <ton@blender.org>2005-12-04 19:15:04 +0300
commit1b7089a306566681969ac52fe27468f4d329143a (patch)
treee977f69409cfd195b1a843ae6a641bb12f91d4d1
parent9633d7a2417f5ecd8c45e6c8d266dd145474ec10 (diff)
Orange 'layer commit' fix: Texture buttons crash when selecting an empty
texture channel
-rw-r--r--source/blender/src/buttons_shading.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index c37544e911a..ca911ee2e79 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -1416,7 +1416,7 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l
{
MTex *mt=NULL;
uiBlock *block;
- ID *id, *idfrom;
+ ID *id=NULL, *idfrom;
int a, yco, loos;
char str[32];
@@ -1425,7 +1425,9 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l
if(uiNewPanel(curarea, block, "Texture", "Texture", 320, 0, 318, 204)==0) return;
/* first do the browse but */
- id= (ID *)mtex->tex;
+ if(mtex)
+ id= (ID *)mtex->tex;
+
if(ma) idfrom= &ma->id;
else if(wrld) idfrom= &wrld->id;
else idfrom= &la->id;