engine: ref: fix possible null dereference, if client doesn't export studio renderer

This commit is contained in:
Alibek Omarov 2019-04-16 23:39:37 +03:00 committed by GitHub
parent 7d8b63fd88
commit 2c17af4850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -167,7 +167,9 @@ static entity_state_t *R_StudioGetPlayerState( int index )
static int pfnGetStudioModelInterface( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio )
{
return clgame.dllFuncs.pfnGetStudioModelInterface( version, ppinterface, pstudio );
return clgame.dllFuncs.pfnGetStudioModelInterface ?
clgame.dllFuncs.pfnGetStudioModelInterface( version, ppinterface, pstudio ) :
0;
}
static byte *pfnImage_GetPool( void )