fix(client): drain flying objects before effect shutdown
This commit is contained in:
@@ -1244,6 +1244,15 @@ void Stop()
|
||||
mt::meshport::shutdown(); // PORT: join SDK worker and stop mesh before Python/platform teardown.
|
||||
#endif
|
||||
g_launcher->Clear();
|
||||
// CPythonApplication::Destroy clears flying objects before characters and
|
||||
// effects. A live missile's ClearAttachInstance still calls CEffectManager;
|
||||
// leaving it for g_flying_manager's destructor used a destroyed singleton.
|
||||
if (g_flying_manager)
|
||||
g_flying_manager->Destroy();
|
||||
// GameSingletons members are destroyed in reverse declaration order. Drain
|
||||
// characters while pyTextTail, pyItem and pyBackground are still alive.
|
||||
if (g_game_singletons)
|
||||
g_game_singletons->kChrMgr.Destroy();
|
||||
g_game_singletons.reset();
|
||||
g_game_application.reset();
|
||||
g_effect_manager.reset();
|
||||
|
||||
Reference in New Issue
Block a user