-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IM_ASSERT(viewport->RendererUserData == NULL && viewport->PlatformUserData == NULL) in ImGui_ImplWin32_Shutdown() #4941
Comments
Please clarify the inconsistency above. Also please test and see if it happens with stock examples. |
Apologies! Updated - it should say Win32 not DX12.. |
Basically the assert imply you should shutdown the renderer backend before the platform backend. Normally either backend would end up calling |
I tested the examples and could not reproduce - though there is no combination of win32+vulkan I still couldn't repro in examples that used one of these. |
I called |
Found the issue. I swapped them around and got a different assert but what I actually found was this order Changing it to the expected order is fine: |
Version/Branch of Dear ImGui:
Version: f1a0731
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_win32.cpp + imgui_impl_vulkan.cpp
Compiler: msvc
Operating System: Windows 10
My Issue/Question:
Hi, I am getting the assert
IM_ASSERT(viewport->RendererUserData == NULL && viewport->PlatformUserData == NULL);
when callingImGui_ImplWin32_Shutdown()
.I have
ImGuiConfigFlags_DockingEnable
but notImGuiConfigFlags_ViewportsEnable
.Should the call to
ImGui_ImplWin32_ShutdownPlatformInterface();
be wrapped inif (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
likeImGui_ImplWin32_InitPlatformInterface()
?Doing this fixes my issue but it could also be user error on my part.
Thanks.
The text was updated successfully, but these errors were encountered: