Skip to content

Commit 1e4d9ab

Browse files
nreaganhoffstadt
authored andcommitted
fix: imgui shutdown when window is null
1 parent caa01c7 commit 1e4d9ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pl_main_glfw.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,8 @@ int main(int argc, char *argv[])
608608
pl__check_for_leaks();
609609

610610
// shutdown imgui
611-
ImGui_ImplGlfw_Shutdown();
611+
if(ptGlfwWindow)
612+
ImGui_ImplGlfw_Shutdown();
612613
ImGui::DestroyContext();
613614

614615
glfwTerminate();

0 commit comments

Comments
 (0)