Examples: DirectX9: Fixed erroneous assert in ImGui_ImplDX9_InvalidateDeviceObjects(). FreeType: Fixed suggested code to not require an initial build call.. (#2454)
// At this point note that we set ImGui::GetIO().Fonts->TexID to be == g_FontTexture, so clear both.
ImGuiIO&io=ImGui::GetIO();
IM_ASSERT(g_FontTexture==io.Fonts->TexID);
if(g_FontTexture)
g_FontTexture->Release();
g_FontTexture=NULL;
io.Fonts->TexID=NULL;
if(g_pVB){g_pVB->Release();g_pVB=NULL;}
if(g_pIB){g_pIB->Release();g_pIB=NULL;}
if(g_FontTexture){g_FontTexture->Release();g_FontTexture=NULL;ImGui::GetIO().Fonts->TexID=NULL;}// We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.