Move MainInterface destruction on disconnect to fix Lua binding crash

This commit is contained in:
Kae 2023-07-23 22:49:23 +10:00
parent 0aee45a117
commit 3b8ea95d61

View File

@ -461,7 +461,6 @@ void ClientApplication::changeState(MainAppState newState) {
}
if (oldState > MainAppState::Title && m_state <= MainAppState::Title) {
m_mainInterface.reset();
if (m_universeClient)
m_universeClient->disconnect();
@ -471,6 +470,7 @@ void ClientApplication::changeState(MainAppState newState) {
m_universeServer.reset();
}
m_cinematicOverlay->stop();
m_mainInterface.reset();
m_voice->clearSpeakers();