Browse Source

game: add another NULL check for CEngineSprite::GetMaterial

pull/230/head
SanyaSho 2 years ago
parent
commit
d23ae89574
  1. 5
      game/client/spritemodel.cpp

5
game/client/spritemodel.cpp

@ -417,6 +417,9 @@ IMaterial *CEngineSprite::GetMaterial( RenderMode_t nRenderMode, int nFrame ) @@ -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, @@ -539,4 +542,4 @@ void CEngineSprite::DrawFrameOfSize( RenderMode_t nRenderMode, int frame, int x,
meshBuilder.End();
pMesh->Draw();
}
}

Loading…
Cancel
Save