mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-27 23:37:03 -05:00
Fonts: Fixed _OnChangedTextureID() asserting when calling on e.g. finalized drawlists.
This commit is contained in:
@@ -599,7 +599,10 @@ void ImDrawList::_OnChangedTexture()
|
||||
AddDrawCmd();
|
||||
return;
|
||||
}
|
||||
IM_ASSERT(curr_cmd->UserCallback == NULL);
|
||||
|
||||
// Unlike other _OnChangedXXX functions this may be called by ImFontAtlasUpdateDrawListsTextures() in more locations so we need to handle this case.
|
||||
if (curr_cmd->UserCallback != NULL)
|
||||
return;
|
||||
|
||||
// Try to merge with previous command if it matches, else use current command
|
||||
ImDrawCmd* prev_cmd = curr_cmd - 1;
|
||||
|
||||
Reference in New Issue
Block a user