From 6277ffe00f88088d2bdc90d81ac82880371d77c2 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 11 Jan 2016 10:19:38 +0000 Subject: [PATCH] Examples: DirectX11: fixed ImGui_ImplDX11_NewFrame() from recreating device objects if render isn't called (g_pVB not set) --- examples/directx11_example/imgui_impl_dx11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/directx11_example/imgui_impl_dx11.cpp b/examples/directx11_example/imgui_impl_dx11.cpp index 74d49784..184ec036 100644 --- a/examples/directx11_example/imgui_impl_dx11.cpp +++ b/examples/directx11_example/imgui_impl_dx11.cpp @@ -472,7 +472,7 @@ void ImGui_ImplDX11_Shutdown() void ImGui_ImplDX11_NewFrame() { - if (!g_pVB) + if (!g_pFontSampler) ImGui_ImplDX11_CreateDeviceObjects(); ImGuiIO& io = ImGui::GetIO();