From 3b8ea95d61a714eaee72978c67c4890774396fa3 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 23 Jul 2023 22:49:23 +1000 Subject: [PATCH] Move MainInterface destruction on disconnect to fix Lua binding crash --- source/client/StarClientApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index 5483591..ab620b4 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -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();