Commit a3c4072a authored by Marco Martin's avatar Marco Martin
Browse files

if the sesison is still loading, wait and then request

parent 554c4185
...@@ -55,6 +55,15 @@ void HomeScreen::executeCommand(const QString &command) ...@@ -55,6 +55,15 @@ void HomeScreen::executeCommand(const QString &command)
void HomeScreen::requestShutdown() void HomeScreen::requestShutdown()
{ {
if (m_session->state() == SessionManagement::State::Loading) {
connect(m_session, &SessionManagement::stateChanged,
this, [this]() {
if (m_session->state() == SessionManagement::State::Ready) {
m_session->requestShutdown();
disconnect(m_session, nullptr, this, nullptr);
}
});
}
m_session->requestShutdown(); m_session->requestShutdown();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment