[glfw] Early-out of GLFW WndProc hook if there's no backend data#7175
[glfw] Early-out of GLFW WndProc hook if there's no backend data#7175nicebyte wants to merge 1 commit into
Conversation
…down If we happen to call `glfwTerminate` after destroying the ImGui context, the WndProc that ImGui installs still gets triggered, but there is no backend data at that time. This is a simple one-line fix that just early-outs if `bd` is NULL for whatever reason.
|
Did you forget to call It's supposed to remove the WndProc hook, which means |
|
Sorry, I should have checked before submitting the PR. |
|
Tempted to add extra asserts in ImGui::DestroyContext() to check they the backend void* are cleared so this would be caught better. I’ll investigate this when I get back them. |
…ackendRendererUserData are NULL. (#7175)
|
Added extra assets in ImGui::DestroyContext()->Shutdown() path: 33d18c5 |
|
Hi @ocornut. I'm having issues with this assert when there are multiple nested ImGui contexts in an application. When multiple ImGui contexts are nested, it is expected to destroy the inner-most contexts before calling |
|
Alternatively, I can also manually set |
If we happen to call
glfwTerminateafter destroying the ImGui context, the WndProc that ImGui installs still gets triggered, but there is no backend data at that time. This is a simple one-line fix that just early-outs ifbdis NULL for whatever reason.