fix: ImNodes not being deinitialized correctly
This commit is contained in:
parent
185a593bc2
commit
ecc86ee429
@ -1093,6 +1093,7 @@ namespace hex {
|
|||||||
ImGui_ImplOpenGL3_Shutdown();
|
ImGui_ImplOpenGL3_Shutdown();
|
||||||
ImGui_ImplGlfw_Shutdown();
|
ImGui_ImplGlfw_Shutdown();
|
||||||
|
|
||||||
|
ImNodes::DestroyContext();
|
||||||
ImPlot3D::DestroyContext();
|
ImPlot3D::DestroyContext();
|
||||||
ImPlot::DestroyContext();
|
ImPlot::DestroyContext();
|
||||||
ImGui::DestroyContext();
|
ImGui::DestroyContext();
|
||||||
|
@ -25,7 +25,10 @@ namespace hex::plugin::builtin {
|
|||||||
ctx->AttributeFlagStack = GImNodes->AttributeFlagStack;
|
ctx->AttributeFlagStack = GImNodes->AttributeFlagStack;
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
}(), ImNodes::DestroyContext };
|
}(), [](ImNodesContext *ptr) {
|
||||||
|
if (ptr != nullptr)
|
||||||
|
ImNodes::DestroyContext(ptr);
|
||||||
|
} };
|
||||||
|
|
||||||
std::list<std::unique_ptr<dp::Node>> nodes;
|
std::list<std::unique_ptr<dp::Node>> nodes;
|
||||||
std::list<dp::Node*> endNodes;
|
std::list<dp::Node*> endNodes;
|
||||||
|
@ -887,7 +887,9 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
bool popWorkspace = false;
|
bool popWorkspace = false;
|
||||||
// Set the ImNodes context to the current workspace context
|
// Set the ImNodes context to the current workspace context
|
||||||
|
auto prevContext = ImNodes::GetCurrentContext();
|
||||||
ImNodes::SetCurrentContext(workspace.context.get());
|
ImNodes::SetCurrentContext(workspace.context.get());
|
||||||
|
ON_SCOPE_EXIT { ImNodes::SetCurrentContext(prevContext); };
|
||||||
|
|
||||||
this->drawContextMenus(workspace);
|
this->drawContextMenus(workspace);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user