Avoid issue when shutting down

This commit is contained in:
Klaus Basan
2018-10-27 01:55:34 +02:00
parent ee73f93c13
commit b977b87177

View File

@@ -73,14 +73,16 @@ namespace BlackGui
void CLoginModeButtons::configureLoginModes() void CLoginModeButtons::configureLoginModes()
{ {
if (!sGui || sGui->isShuttingDown()) { return; }
// we have no idea how we can get here without the context existing Ref T389 // 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 // how is this possible
Q_ASSERT_X(false, Q_FUNC_INFO, "No context or sGUI"); 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 // Disable pilot login modes
ui->rb_LoginNormal->setEnabled(false); ui->rb_LoginNormal->setEnabled(false);