From ea83d040e60d179248ac6213cf53b3343e95b371 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 24 Nov 2021 16:46:40 +0100 Subject: [PATCH] Viewports: fix missing default per-window value for ParentViewportId due to zero-cleared in-window instance (#4756) Broken by 2080d12b --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index 3663a46fa..0621e7324 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3092,6 +3092,7 @@ ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name) : DrawListInst DrawList = &DrawListInst; DrawList->_Data = &context->DrawListSharedData; DrawList->_OwnerName = Name; + IM_PLACEMENT_NEW(&WindowClass) ImGuiWindowClass(); } ImGuiWindow::~ImGuiWindow()