DrawList: fixed dangling ImDrawList::_OwnerName when using animated label. (#9552)

This commit is contained in:
Daniel Castonguay 2026-09-22 18:12:59 -04:00 • committed by ocornut
parent cc072ca90e
commit 623ba46120
2 changed files with 2 additions and 0 deletions

View file

@ -124,6 +124,7 @@ Other Changes:
- Added optional `platform_io.DrawCallback_SetSamplerFromTex` standard backend-agnostic
draw callback for requesting to use the sampler associated already associated to a texture.
Currently only supported by the OpenGL2/3 and SDLRenderer3 backend. (#9378)
- Fixed dangling ImDrawList::_OwnerName when using animated label. (#9552) [@ubi-dcastonguay]
- Demo:
- Added `Widgets->Mixed Values` section. (#5518, #5677, #6865)
- Style Editor: fixed style/colors combo box applying style when opening Combo.

View file

@ -7755,6 +7755,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
size_t buf_len = (size_t)window->NameBufLen;
window->Name = ImStrdupcpy(window->Name, &buf_len, name);
window->NameBufLen = (int)buf_len;
window->DrawList->_OwnerName = window->Name;
}
// UPDATE CONTENTS SIZE, UPDATE HIDDEN STATUS