Skip to content

Commit

Permalink
Fix the crash while exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
hyv1001 committed May 23, 2022
1 parent 9fe8bf6 commit 4a38fb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions engine/source/editor/source/editor_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ namespace Pilot
}
if (ImGui::MenuItem("Exit"))
{
g_editor_global_context.m_engine_runtime->shutdownEngine();
exit(0);
}
ImGui::EndMenu();
Expand Down
9 changes: 5 additions & 4 deletions engine/source/runtime/function/global/global_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ namespace Pilot

m_asset_manager = std::make_shared<AssetManager>();

m_physics_system = std::make_shared<PhysicsSystem>();

m_world_manager = std::make_shared<WorldManager>();
m_world_manager->initialize();

m_physics_system = std::make_shared<PhysicsSystem>();

m_window_system = std::make_shared<WindowSystem>();
WindowCreateInfo window_create_info;
m_window_system->initialize(window_create_info);
Expand All @@ -58,16 +58,17 @@ namespace Pilot

m_window_system.reset();

m_physics_system.reset();

m_scene_manager.reset();

m_world_manager.reset();

m_physics_system.reset();

m_input_system.reset();

m_asset_manager.reset();


m_logger_system.reset();

m_file_servcie.reset();
Expand Down

0 comments on commit 4a38fb3

Please sign in to comment.