mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-27 11:16:43 +01:00
engine: always unlink variables and commands BEFORE all pointers to them would be lost
This commit is contained in:
parent
4ce2475602
commit
6a1f96a2c6
@ -3874,13 +3874,13 @@ void CL_UnloadProgs( void )
|
||||
Cvar_FullSet( "cl_background", "0", FCVAR_READ_ONLY );
|
||||
Cvar_FullSet( "host_clientloaded", "0", FCVAR_READ_ONLY );
|
||||
|
||||
Cvar_Unlink( FCVAR_CLIENTDLL );
|
||||
Cmd_Unlink( CMD_CLIENTDLL );
|
||||
|
||||
COM_FreeLibrary( clgame.hInstance );
|
||||
Mem_FreePool( &cls.mempool );
|
||||
Mem_FreePool( &clgame.mempool );
|
||||
memset( &clgame, 0, sizeof( clgame ));
|
||||
|
||||
Cvar_Unlink( FCVAR_CLIENTDLL );
|
||||
Cmd_Unlink( CMD_CLIENTDLL );
|
||||
}
|
||||
|
||||
qboolean CL_LoadProgs( const char *name )
|
||||
|
@ -1218,12 +1218,12 @@ void UI_UnloadProgs( void )
|
||||
|
||||
Cvar_FullSet( "host_gameuiloaded", "0", FCVAR_READ_ONLY );
|
||||
|
||||
Cvar_Unlink( FCVAR_GAMEUIDLL );
|
||||
Cmd_Unlink( CMD_GAMEUIDLL );
|
||||
|
||||
COM_FreeLibrary( gameui.hInstance );
|
||||
Mem_FreePool( &gameui.mempool );
|
||||
memset( &gameui, 0, sizeof( gameui ));
|
||||
|
||||
Cvar_Unlink( FCVAR_GAMEUIDLL );
|
||||
Cmd_Unlink( CMD_GAMEUIDLL );
|
||||
}
|
||||
|
||||
qboolean UI_LoadProgs( void )
|
||||
|
@ -379,14 +379,14 @@ static void R_UnloadProgs( void )
|
||||
|
||||
Cvar_FullSet( "host_refloaded", "0", FCVAR_READ_ONLY );
|
||||
|
||||
Cvar_Unlink( FCVAR_RENDERINFO | FCVAR_GLCONFIG );
|
||||
Cmd_Unlink( CMD_REFDLL );
|
||||
|
||||
COM_FreeLibrary( ref.hInstance );
|
||||
ref.hInstance = NULL;
|
||||
|
||||
memset( &refState, 0, sizeof( refState ));
|
||||
memset( &ref.dllFuncs, 0, sizeof( ref.dllFuncs ));
|
||||
|
||||
Cvar_Unlink( FCVAR_RENDERINFO | FCVAR_GLCONFIG );
|
||||
Cmd_Unlink( CMD_REFDLL );
|
||||
}
|
||||
|
||||
static void CL_FillTriAPIFromRef( triangleapi_t *dst, const ref_interface_t *src )
|
||||
|
Loading…
Reference in New Issue
Block a user