Skip to content

Commit

Permalink
Fix crash when deleting a link while it's flowing
Browse files Browse the repository at this point in the history
  • Loading branch information
adepierre committed Aug 23, 2024
1 parent efc609b commit 7be8842
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ficsit-companion/src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ void App::DeleteNode(const ax::NodeEditor::NodeId id)
{
if (p->link != nullptr)
{
p->link->end = nullptr;
DeleteLink(p->link->id);
}
}
for (auto& p : (*it)->outs)
{
if (p->link != nullptr)
{
p->link->start = nullptr;
DeleteLink(p->link->id);
}
}
nodes.erase(it);
Expand Down Expand Up @@ -744,13 +744,13 @@ void App::Render()

ax::NodeEditor::Begin("Graph", ImGui::GetContentRegionAvail());

DeleteNodesLinks();
DragLink();

NudgeNodes();
RenderNodes();
RenderLinks();

DragLink();
DeleteNodesLinks();

AddNewNode();

UpdateNodesRate();
Expand Down

0 comments on commit 7be8842

Please sign in to comment.