Browse Source

Move rendering engine reset after deletion of game objects

x2048 1 year ago
parent
commit
9af587c54e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/client/game.cpp

+ 2 - 2
src/client/game.cpp

@@ -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();