mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-11 23:57:59 +00:00
Merge pull request #230 from SanyaSho/patch/null-sprite-crash
Add missing NULL check from original MP branch
This commit is contained in:
commit
e392686d3c
@ -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