Closed
Description
If we click Reload Current Level button and then run the editor, pilot will crash.
It seems like that some codes from editor.cpp
is wrong:
if (ImGui::BeginMenuBar())
{
if (ImGui::BeginMenu("Menu"))
{
if (ImGui::MenuItem("Reload Current Level"))
{
WorldManager::getInstance().reloadCurrentLevel();
onGObjectSelected(PILOT_INVALID_GOBJECT_ID);
}
if (ImGui::MenuItem("Save Current Level"))
{
WorldManager::getInstance().saveCurrentLevel();
}
if (ImGui::MenuItem("Exit"))
{
exit(0);
}
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
the line 343 should not be
onGObjectSelected(PILOT_INVALID_GOBJECT_ID);