Skip to content

Appending to an exiting dock node's tab bar, using DockNodeBeginAmendTabBar, causes an assert when closing a window. #5515

@stormsc1

Description

@stormsc1

Version/Branch of Dear ImGui:
Version: 1.88
Branch: docking

Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: MSVC
Operating System: Windows 10

My Issue/Question:
Appending to an exiting dock node's tab bar, using DockNodeBeginAmendTabBar, causes an assert when closing a window.
It only crashes if the window is closed with a button inside the window. This leads be to believe that it's a focus issue.

ImGuiID dockspace_id = ImGui::GetID("DockSpace");
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags, window_class);

// If this section is commented out, the crash will not occur.
ImGuiDockNode* dockNode = (ImGuiDockNode*)GImGui->DockContext.Nodes.GetVoidPtr(dockspace_id);
if (ImGui::DockNodeBeginAmendTabBar(dockNode))
{
	/* Render tab item... */
	ImGui::DockNodeEndAmendTabBar();
}
Assertion failed: window == window->RootWindow, file C:\Dev\KhaosSystems\Raijin\Vendor\Amaterasu\Vendor\imgui\imgui.cpp, line 7333

https://gyazo.com/956366478d78709d7f165422ed93708c

This might just be me using this incorrectly, but I am unable to find any example of the intended use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions