diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index 7fc5e441..122807e9 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -315,10 +315,15 @@ static screenfade_t *pfnRefGetScreenFade( void ) static qboolean R_Init_Video_( ref_graphic_apis_t type ) { - host.apply_opengl_config = true; - Cbuf_AddTextf( "exec %s.cfg\n", ref.dllFuncs.R_GetConfigName()); - Cbuf_Execute(); - host.apply_opengl_config = false; + const char *config_name = ref.dllFuncs.R_GetConfigName ? ref.dllFuncs.R_GetConfigName() : NULL; + + if( config_name ) + { + host.apply_opengl_config = true; + Cbuf_AddTextf( "exec %s.cfg\n", config_name ); + Cbuf_Execute(); + host.apply_opengl_config = false; + } return R_Init_Video( type ); } diff --git a/engine/common/con_utils.c b/engine/common/con_utils.c index 7012a82a..e24513f0 100644 --- a/engine/common/con_utils.c +++ b/engine/common/con_utils.c @@ -1542,14 +1542,19 @@ save opengl variables into opengl.cfg */ void Host_WriteOpenGLConfig( void ) { + const char *config_name; string name; file_t *f; - if( Sys_CheckParm( "-nowriteconfig" ) ) + if( Sys_CheckParm( "-nowriteconfig" ) || !ref.dllFuncs.R_GetConfigName ) return; - Q_snprintf( name, sizeof( name ), "%s.cfg", ref.dllFuncs.R_GetConfigName() ); + config_name = ref.dllFuncs.R_GetConfigName(); + if( !config_name ) + return; + + Q_snprintf( name, sizeof( name ), "%s.cfg", config_name ); f = FS_Open( va( "%s.new", name ), "w", false ); if( f ) diff --git a/engine/server/sv_frame.c b/engine/server/sv_frame.c index fd71183d..89c8ce53 100644 --- a/engine/server/sv_frame.c +++ b/engine/server/sv_frame.c @@ -821,7 +821,6 @@ void SV_SendClientMessages( void ) { sv_client_t *cl; int i; - double updaterate_time; double time_until_next_message; if( sv.state == ss_dead )