game: add another NULL check for CEngineSprite::GetMaterial

This commit is contained in:
SanyaSho 2023-04-07 17:57:47 +03:00
parent 81d86fb9dc
commit 50e3a751ee

View file

@ -417,6 +417,9 @@ IMaterial *CEngineSprite::GetMaterial( RenderMode_t nRenderMode, int nFrame )
IMaterial *pMaterial = m_material[nRenderMode];
if( !pMaterial )
return NULL;
IMaterialVar* pFrameVar = pMaterial->FindVarFast( "$frame", &frameCache );
if ( pFrameVar )
{
@ -539,4 +542,4 @@ void CEngineSprite::DrawFrameOfSize( RenderMode_t nRenderMode, int frame, int x,
meshBuilder.End();
pMesh->Draw();
}
}