mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Prevent connecting to null address string
Add check to prevent connect code getting fired if address buffer is empty.
This commit is contained in:
parent
f319fc0846
commit
4554a92e27
@ -334,15 +334,18 @@ void CBrowser::BrowserPanel(void)
|
||||
ImGui::Separator();
|
||||
ImGui::PushItemWidth(ImGui::GetWindowContentRegionWidth() / 4);
|
||||
{
|
||||
ImGui::InputTextWithHint("##ServerBrowser_ServerCon", "Enter ip-address and port", m_szServerAddressBuffer, IM_ARRAYSIZE(m_szServerAddressBuffer));
|
||||
ImGui::InputTextWithHint("##ServerBrowser_ServerCon", "Server address and port", m_szServerAddressBuffer, IM_ARRAYSIZE(m_szServerAddressBuffer));
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::InputTextWithHint("##ServerBrowser_ServerKey", "Enter encryption key", m_szServerEncKeyBuffer, IM_ARRAYSIZE(m_szServerEncKeyBuffer));
|
||||
ImGui::InputTextWithHint("##ServerBrowser_ServerKey", "Encryption key", m_szServerEncKeyBuffer, IM_ARRAYSIZE(m_szServerEncKeyBuffer));
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Connect", ImVec2(ImGui::GetWindowContentRegionWidth() / 4.3f, ImGui::GetFrameHeight())))
|
||||
{
|
||||
g_pServerListManager->ConnectToServer(m_szServerAddressBuffer, m_szServerEncKeyBuffer);
|
||||
if (m_szServerAddressBuffer[0])
|
||||
{
|
||||
g_pServerListManager->ConnectToServer(m_szServerAddressBuffer, m_szServerEncKeyBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
Loading…
x
Reference in New Issue
Block a user