DrawList: reworked assert in PushTexture() to allow convenience grace period of using texture already queued for destroy during the same frame. (#9528, #8465)

Amend 131f5c57ab
This commit is contained in:
ocornut
2026-09-01 16:21:37 +02:00
parent e0537bf72b
commit f562ab8e32
3 changed files with 5 additions and 2 deletions

View File

@@ -699,7 +699,7 @@ 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);
IM_ASSERT(tex_ref._TexData->Status != ImTextureStatus_WantDestroy && tex_ref._TexData->Status != ImTextureStatus_Destroyed);
_OnChangedTexture();
}