Minor fixes in login component

This commit is contained in:
Klaus Basan
2018-10-23 19:00:25 +02:00
parent d4d397164d
commit 10f0f175c8

View File

@@ -214,11 +214,13 @@ namespace BlackGui
void CLoginComponent::toggleNetworkConnection() void CLoginComponent::toggleNetworkConnection()
{ {
if (ui->tw_Network->currentWidget() == ui->pg_FsdDetails) if (!sGui || sGui->isShuttingDown()) { return; }
if (ui->tw_Network->currentWidget() != ui->pg_NetworkVatsim && ui->tw_Network->currentWidget() != ui->pg_OtherServers)
{ {
this->showOverlayMessage(CStatusMessage(this).validationError("No login possible from this very tab, use VATSIM or other servers"), OverlayMessageMs); this->showOverlayMessage(CStatusMessage(this).validationError("No login possible from this very tab, use VATSIM or other servers"), OverlayMessageMs);
return; return;
} }
const bool isConnected = sGui && sGui->getIContextNetwork()->isConnected(); const bool isConnected = sGui && sGui->getIContextNetwork()->isConnected();
const bool vatsimLogin = this->isVatsimNetworkTabSelected(); const bool vatsimLogin = this->isVatsimNetworkTabSelected();