diff --git a/src/Components/Modules/ServerInfo.cpp b/src/Components/Modules/ServerInfo.cpp index 164bc52a..824ead48 100644 --- a/src/Components/Modules/ServerInfo.cpp +++ b/src/Components/Modules/ServerInfo.cpp @@ -54,7 +54,7 @@ namespace Components auto* serverInfo = ServerList::GetCurrentServer(); - if (info) + if (info && serverInfo) { Dvar::Var("uiSi_ServerName").set(serverInfo->hostname); Dvar::Var("uiSi_MaxClients").set(serverInfo->clients); diff --git a/src/Components/Modules/ServerList.cpp b/src/Components/Modules/ServerList.cpp index efabd032..d4252115 100644 --- a/src/Components/Modules/ServerList.cpp +++ b/src/Components/Modules/ServerList.cpp @@ -176,13 +176,13 @@ namespace Components { CurrentServer = index; - auto* info = GetCurrentServer(); + auto* serverInfo = GetCurrentServer(); - if (info) + if (serverInfo) { UIServerSelected.set(true); - UIServerSelectedMap.set(info->mapname); - Dvar::Var("ui_serverSelectedGametype").set(info->gametype); + UIServerSelectedMap.set(serverInfo->mapname); + Dvar::Var("ui_serverSelectedGametype").set(serverInfo->gametype); } else {