Fix for possible null pointer, from uncle entity in irc

This commit is contained in:
2010-04-16 04:44:15 +00:00
parent 4ad2b51d64
commit 07052eb377

View File

@@ -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) {