Skip to content

Commit

Permalink
Core : Fix crash in project manager
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrno committed May 12, 2024
1 parent 8e87e3d commit 9dbcf87
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tools/launcher/app/core/ProjectManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,15 @@ void ProjectManager::OnImGuiRender()

ImGui::Columns(2, NULL);

for (int i = 0; i <= project_templates.size(); i++)
for (int project = 0; project < project_templates.size(); project++)
{
_i++;
if (project_templates[i])
if(project_templates[project] != NULL)
{
{
ImGui::BeginChild("LOGO_", ImVec2(70, 70), true);
try
{
logo(project_templates[i]->m_logo_path, i, project_templates.size());

logo(project_templates[project]->m_logo_path, project, project_templates.size());
}
catch (std::exception e)
{
Expand All @@ -287,26 +285,28 @@ void ProjectManager::OnImGuiRender()
ImGui::GetFont()->Scale *= 1.3;
ImGui::PushFont(ImGui::GetFont());

ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.8f), project_templates[i]->m_proper_name.c_str());
ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.8f), project_templates[project]->m_proper_name.c_str());

ImGui::GetFont()->Scale = oldsize;
ImGui::PopFont();

ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.5f), "v");
ImGui::SameLine();
ImGui::Text(project_templates[i]->m_author.c_str());
ImGui::Text(project_templates[project]->m_author.c_str());
ImGui::EndChild();
}

ImGui::TextWrapped(project_templates[i]->m_description.c_str());
ImGui::TextWrapped(project_templates[project]->m_description.c_str());

if (ImGui::Button("Create"))
{
template_is_selected = true;
selected_template_object = project_templates[i];
selected_template_object = project_templates[project];
}
}

ImGui::NextColumn();

}
}
ImGui::EndChild();
}
Expand Down

0 comments on commit 9dbcf87

Please sign in to comment.