mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 22:27:05 +00:00
game: add another NULL check for CEngineSprite::GetMaterial
This commit is contained in:
parent
3fcf986853
commit
d23ae89574
@ -417,6 +417,9 @@ IMaterial *CEngineSprite::GetMaterial( RenderMode_t nRenderMode, int nFrame )
|
|||||||
|
|
||||||
|
|
||||||
IMaterial *pMaterial = m_material[nRenderMode];
|
IMaterial *pMaterial = m_material[nRenderMode];
|
||||||
|
if( !pMaterial )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
IMaterialVar* pFrameVar = pMaterial->FindVarFast( "$frame", &frameCache );
|
IMaterialVar* pFrameVar = pMaterial->FindVarFast( "$frame", &frameCache );
|
||||||
if ( pFrameVar )
|
if ( pFrameVar )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user