do not call m_loadTexture if it is null, retabbed

git-svn-id: svn://anubis/misc/wfobj@42 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
josh 2008-03-01 20:58:27 +00:00
parent 64fea9c370
commit 95bd26e1f2

View File

@ -573,6 +573,8 @@ void WFMtl::renderBegin(const string & mtlname)
{ {
/* TODO: figure out how i want to load the texture */ /* TODO: figure out how i want to load the texture */
if (stmts[i].size() == 2) if (stmts[i].size() == 2)
{
if (m_loadTexture != NULL)
{ {
GLuint tex = m_loadTexture( (basePath(m_fileName) + GLuint tex = m_loadTexture( (basePath(m_fileName) +
stmts[i][1]).c_str() ); stmts[i][1]).c_str() );
@ -588,6 +590,7 @@ void WFMtl::renderBegin(const string & mtlname)
} }
} }
} }
}
if (didSomething) if (didSomething)
{ {