Move rendering engine reset after deletion of game objects

This commit is contained in:
x2048 2023-03-20 11:42:16 +01:00 committed by GitHub
parent 6cd2eea487
commit 9af587c54e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1113,6 +1113,8 @@ Game::~Game()
&settingChangedCallback, this);
g_settings->deregisterChangedCallback("camera_smoothing",
&settingChangedCallback, this);
if (m_rendering_engine)
m_rendering_engine->finalize();
}
bool Game::startup(bool *kill,
@ -1289,8 +1291,6 @@ void Game::run()
void Game::shutdown()
{
m_rendering_engine->finalize();
auto formspec = m_game_ui->getFormspecGUI();
if (formspec)
formspec->quitMenu();