diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-16 08:44:15 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-16 08:44:15 +0400 |
commit | 07052eb37772ac53463a51c10e3a7072d9f7c33b (patch) | |
tree | b3d45912e19b245f19701a2e58ffa1c2d6335fd5 /source | |
parent | 4ad2b51d647b1c73e45791ec97aa1e42e76b1fad (diff) |
Fix for possible null pointer, from uncle entity in irc
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 50d45f0c8e8..d06d3e6705d 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -346,7 +346,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre } - if(sp->pr_method==PR_ICON_RENDER) { + if(sp && sp->pr_method==PR_ICON_RENDER) { if (mat->material_type == MA_TYPE_HALO) { sce->lay= 1<<MA_FLAT; } @@ -406,7 +406,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre } } - if(tex && tex->nodetree && sp->pr_method==PR_NODE_RENDER) + if(tex && tex->nodetree && sp && sp->pr_method==PR_NODE_RENDER) ntreeInitPreview(tex->nodetree, sp->sizex, sp->sizey); } else if(id_type==ID_LA) { |