Skip to content

Commit

Permalink
[Editor] Fixed crash when trying to edit an entity's transform (must …
Browse files Browse the repository at this point in the history
…nasty regression)
  • Loading branch information
PanosK92 committed Nov 24, 2022
1 parent b402486 commit edd11f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions editor/ImGui/ImGuiExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class EditorHelper
context = context_;
world = context->GetSystem<Spartan::World>();
renderer = context->GetSystem<Spartan::Renderer>();
input = context->GetSystem<Spartan::Input>();
}

static void LoadMesh(const std::string& file_path, const uint32_t load_flags)
Expand Down
9 changes: 4 additions & 5 deletions editor/Widgets/WorldViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,19 +474,18 @@ void WorldViewer::PopupEntityRename() const

if (ImGui::BeginPopup("##RenameEntity"))
{
auto selectedentity = EditorHelper::selected_entity.lock();
if (!selectedentity)
auto selected_entity = EditorHelper::selected_entity.lock();
if (!selected_entity)
{
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
return;
}

auto name = selectedentity->GetName();

string name = selected_entity->GetName();
ImGui::Text("Name:");
ImGui::InputText("##edit", &name);
selectedentity->SetName(string(name));
selected_entity->SetName(string(name));

if (ImGui_SP::button("Ok"))
{
Expand Down
3 changes: 0 additions & 3 deletions runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1881,9 +1881,6 @@ namespace Spartan
{
cmd_list->BeginTimeblock("amd_ffx_fsr2");

// Get sharpness value
float sharpness = GetOption<float>(RendererOption::Sharpness);

RHI_FSR2::Dispatch(
cmd_list,
tex_in,
Expand Down

0 comments on commit edd11f5

Please sign in to comment.