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>2010-12-20 14:33:52 +0300
committerTon Roosendaal <ton@blender.org>2010-12-20 14:33:52 +0300
commit88b2955564c42359d4367a4da52596c30dda3cd1 (patch)
treec08dd03385022633912cd43782cd3d69eeb0c345 /source/blender/editors/render
parent71202e26ffad559dd308b578f15f08a8d5c85056 (diff)
Bugfix #25307
Node shaders + textures, showing in Texture properties, with option "show both previews" had bad ID checking.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_preview.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index f492d9a2f0f..f8c8faffc88 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -918,11 +918,13 @@ static int shader_preview_break(void *spv)
static void shader_preview_updatejob(void *spv)
{
ShaderPreview *sp= spv;
- Material *mat= (Material *)sp->id;
- if(sp->matcopy && mat->nodetree)
- ntreeLocalSync(sp->matcopy->nodetree, mat->nodetree);
-
+ if(sp->id && GS(sp->id->name) == ID_MA) {
+ Material *mat= (Material *)sp->id;
+
+ if(sp->matcopy && mat->nodetree && sp->matcopy->nodetree)
+ ntreeLocalSync(sp->matcopy->nodetree, mat->nodetree);
+ }
}
static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int first)