Textures: Fixed not updating ImTextureData's RefCount when destroying a context using a shared ImFontAtlas. (#8975)

This commit is contained in:
ocornut
2025-10-01 14:55:16 +02:00
parent b987970870
commit 9809b0b061
3 changed files with 8 additions and 1 deletions

View File

@@ -596,7 +596,7 @@ void ImGui_ImplDX11_InvalidateDeviceObjects()
if (tex->RefCount == 1)
ImGui_ImplDX11_DestroyTexture(tex);
if (bd->pTexSamplerLinear) { bd->pTexSamplerLinear->Release(); bd->pTexSamplerLinear = nullptr; }
if (bd->pTexSamplerLinear) { bd->pTexSamplerLinear->Release(); bd->pTexSamplerLinear = nullptr; }
if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }