From d667de949045e0046ba935fae2d9039221e27da2 Mon Sep 17 00:00:00 2001 From: Chris Maughan Date: Tue, 4 Aug 2015 14:03:36 +0100 Subject: [PATCH] Clear font texture view to ensure Release() doesn't get called twice --- 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 fb59efd9c..2f23a0636 100644 --- a/examples/directx11_example/imgui_impl_dx11.cpp +++ b/examples/directx11_example/imgui_impl_dx11.cpp @@ -402,7 +402,7 @@ void ImGui_ImplDX11_InvalidateDeviceObjects() return; if (g_pFontSampler) { g_pFontSampler->Release(); g_pFontSampler = NULL; } - if (g_pFontTextureView) { g_pFontTextureView->Release(); ImGui::GetIO().Fonts->TexID = 0; } + if (g_pFontTextureView) { g_pFontTextureView->Release(); g_pFontTextureView = NULL; ImGui::GetIO().Fonts->TexID = 0; } if (g_pIB) { g_pIB->Release(); g_pIB = NULL; } if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }