mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
Examples, Platform, Viewport: Fixed inconsistent window ownership issues. Added comments. Made Win32/SDL back-ends track ownership.
This commit is contained in:
parent
56ad2a2d74
commit
d4dd448511
9 changed files with 44 additions and 28 deletions
|
|
@ -554,6 +554,7 @@ static void ImGui_ImplDX10_CreateWindow(ImGuiViewport* viewport)
|
|||
|
||||
static void ImGui_ImplDX10_DestroyWindow(ImGuiViewport* viewport)
|
||||
{
|
||||
// The main viewport (owned by the application) will always have RendererUserData == NULL here since we didn't create the data for it.
|
||||
if (ImGuiViewportDataDx10* data = (ImGuiViewportDataDx10*)viewport->RendererUserData)
|
||||
{
|
||||
if (data->SwapChain)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue