Explorar o código

Merge pull request #290 from cmaughan/master

Examples: DirectX11: Clear font texture view pointer to ensure Release() doesn't get called twice
omar %!s(int64=10) %!d(string=hai) anos
pai
achega
a526b423e8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/directx11_example/imgui_impl_dx11.cpp

+ 1 - 1
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; }