mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
fixed bug that crashes the server if settings tunings in the server config
This commit is contained in:
parent
123c5b5b99
commit
70dea7e398
|
@ -9,7 +9,8 @@ GAMECONTEXT::GAMECONTEXT()
|
|||
{
|
||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||
players[i] = 0;
|
||||
|
||||
|
||||
controller = 0;
|
||||
vote_closetime = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@ TUNING_PARAMS tuning;
|
|||
|
||||
static void check_pure_tuning()
|
||||
{
|
||||
// might not be created yet during start up
|
||||
if(!game.controller)
|
||||
return;
|
||||
|
||||
if( strcmp(game.controller->gametype, "DM")==0 ||
|
||||
strcmp(game.controller->gametype, "TDM")==0 ||
|
||||
strcmp(game.controller->gametype, "CTF")==0)
|
||||
|
|
Loading…
Reference in a new issue