mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-23 23:29:34 +08:00
Fonts: fixed a crash when modifying different texture format with a legacy backend. (#8824)
build / Windows (push) Has been cancelled
build / Linux (push) Has been cancelled
build / MacOS (push) Has been cancelled
build / iOS (push) Has been cancelled
build / Emscripten (push) Has been cancelled
build / Android (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
build / Windows (push) Has been cancelled
build / Linux (push) Has been cancelled
build / MacOS (push) Has been cancelled
build / iOS (push) Has been cancelled
build / Emscripten (push) Has been cancelled
build / Android (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
This commit is contained in:
+1
-5
@@ -3363,11 +3363,7 @@ void ImFontAtlasBuildMain(ImFontAtlas* atlas)
|
||||
{
|
||||
IM_ASSERT(!atlas->Locked && "Cannot modify a locked ImFontAtlas!");
|
||||
if (atlas->TexData && atlas->TexData->Format != atlas->TexDesiredFormat)
|
||||
{
|
||||
ImVec2i new_tex_size = ImFontAtlasTextureGetSizeEstimate(atlas);
|
||||
ImFontAtlasBuildDestroy(atlas);
|
||||
ImFontAtlasTextureAdd(atlas, new_tex_size.x, new_tex_size.y);
|
||||
}
|
||||
ImFontAtlasBuildClear(atlas);
|
||||
|
||||
if (atlas->Builder == NULL)
|
||||
ImFontAtlasBuildInit(atlas);
|
||||
|
||||
Reference in New Issue
Block a user