浏览代码

Viewports: fix missing default per-window value for ParentViewportId due to zero-cleared in-window instance (#4756)

Broken by 2080d12b
ocornut 3 年之前
父节点
当前提交
ea83d040e6
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      imgui.cpp

+ 1 - 0
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()