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 21:18:36 +0300
committerTon Roosendaal <ton@blender.org>2005-12-04 21:18:36 +0300
commit386ac3877a83cb19f5c4134bd108afc93f6f994c (patch)
tree67f695c556d4e33a1b841c89021e0b0497f05a87
parentbba3cebd4cde769758d33de08057cf0952bb999d (diff)
Dang, another fix in orange tree... I keep spamming commit maillist that
way! This fixes a sometimes-crash when doing previews for world or lamp.
-rw-r--r--source/blender/src/buttons_shading.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index cc4016111e7..b6f600118de 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -2564,7 +2564,12 @@ void do_matbuts(unsigned short event)
MTex *mtex;
/* all operations default on active material layer here */
- ma = get_active_matlayer(G.buts->lockpoin);
+ /* but this also gets called for lamp and world... */
+ ma= G.buts->lockpoin;
+ if(ma && GS(ma->id.name)==ID_MA)
+ ma = get_active_matlayer(ma);
+ else
+ ma= NULL;
switch(event) {
case B_MAT_YF_PRESET: {