mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Avoid issue when shutting down
This commit is contained in:
@@ -73,14 +73,16 @@ namespace BlackGui
|
||||
|
||||
void CLoginModeButtons::configureLoginModes()
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
|
||||
// we have no idea how we can get here without the context existing Ref T389
|
||||
if (CBuildConfig::isLocalDeveloperDebugBuild() && (!sGui || !sGui->getIContextSimulator()))
|
||||
if (CBuildConfig::isLocalDeveloperDebugBuild() && (!sGui->getIContextSimulator()))
|
||||
{
|
||||
// how is this possible
|
||||
Q_ASSERT_X(false, Q_FUNC_INFO, "No context or sGUI");
|
||||
}
|
||||
|
||||
if (!sGui || !sGui->getIContextSimulator() || (!sGui->isDeveloperFlagSet() && !sGui->getIContextSimulator()->isSimulatorSimulating()))
|
||||
if (!sGui->getIContextSimulator() || (!sGui->isDeveloperFlagSet() && !sGui->getIContextSimulator()->isSimulatorSimulating()))
|
||||
{
|
||||
// Disable pilot login modes
|
||||
ui->rb_LoginNormal->setEnabled(false);
|
||||
|
||||
Reference in New Issue
Block a user