Textures: Detect when using a texture that's about to be destroyed.

This commit is contained in:
ocornut
2025-03-05 17:18:54 +01:00
parent 0b71339122
commit 131f5c57ab
2 changed files with 6 additions and 1 deletions

View File

@@ -676,6 +676,8 @@ void ImDrawList::PushTexture(ImTextureRef tex_ref)
{
_TextureStack.push_back(tex_ref);
_CmdHeader.TexRef = tex_ref;
if (tex_ref._TexData != NULL)
IM_ASSERT(tex_ref._TexData->WantDestroyNextFrame == false);
_OnChangedTexture();
}