engine: server: fix possible NULL dereference
This commit is contained in:
parent
06e476e8c8
commit
38e8a581b6
1 changed files with 2 additions and 2 deletions
|
@ -5236,7 +5236,7 @@ qboolean SV_LoadProgs( const char *name )
|
||||||
Con_Printf( S_WARN "%s: interface version %i should be %i\n", __func__, INTERFACE_VERSION, version );
|
Con_Printf( S_WARN "%s: interface version %i should be %i\n", __func__, INTERFACE_VERSION, version );
|
||||||
|
|
||||||
// fallback to old API
|
// fallback to old API
|
||||||
if( !GetEntityAPI( &svgame.dllFuncs, version ))
|
if( GetEntityAPI && !GetEntityAPI( &svgame.dllFuncs, version ))
|
||||||
{
|
{
|
||||||
COM_FreeLibrary( svgame.hInstance );
|
COM_FreeLibrary( svgame.hInstance );
|
||||||
Con_Printf( S_ERROR "%s: couldn't get entity API\n", __func__ );
|
Con_Printf( S_ERROR "%s: couldn't get entity API\n", __func__ );
|
||||||
|
@ -5248,7 +5248,7 @@ qboolean SV_LoadProgs( const char *name )
|
||||||
}
|
}
|
||||||
else Con_Reportf( "%s: ^2initailized extended EntityAPI ^7ver. %i\n", __func__, version );
|
else Con_Reportf( "%s: ^2initailized extended EntityAPI ^7ver. %i\n", __func__, version );
|
||||||
}
|
}
|
||||||
else if( !GetEntityAPI( &svgame.dllFuncs, version ))
|
else if( GetEntityAPI && !GetEntityAPI( &svgame.dllFuncs, version ))
|
||||||
{
|
{
|
||||||
COM_FreeLibrary( svgame.hInstance );
|
COM_FreeLibrary( svgame.hInstance );
|
||||||
Con_Printf( S_ERROR "%s: couldn't get entity API\n", __func__ );
|
Con_Printf( S_ERROR "%s: couldn't get entity API\n", __func__ );
|
||||||
|
|
Loading…
Add table
Reference in a new issue