From 31762a81734301e620f4f075a7ddaf41ab8f9de7 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 3 Feb 2022 12:04:11 +0100 Subject: [PATCH] Docking: fixed potential crash if a passthrough dock node is submitted without a child intermediate (currently not possible via API) --- imgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 3e17a387..614016bb 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -14979,7 +14979,8 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node) if (central_node_hole && !hole_rect.IsInverted()) { SetWindowHitTestHole(host_window, hole_rect.Min, hole_rect.Max - hole_rect.Min); - SetWindowHitTestHole(host_window->ParentWindow, hole_rect.Min, hole_rect.Max - hole_rect.Min); + if (host_window->ParentWindow) + SetWindowHitTestHole(host_window->ParentWindow, hole_rect.Min, hole_rect.Max - hole_rect.Min); } }