mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-01 21:17:42 -05:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_glfw.cpp # imgui.cpp
This commit is contained in:
@@ -3701,7 +3701,7 @@ void ImFontAtlasFontDestroySourceData(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
IM_UNUSED(atlas);
|
||||
// IF YOU GET A CRASH IN THE IM_FREE() CALL HERE AND USED AddFontFromMemoryTTF():
|
||||
// - DUE TO LEGACY REASON AddFontFromMemoryTTF() TRANSFERS MEMORY OWNERSHIP BY DEFAULT.
|
||||
// - IT WILL THEREFORE CRASH WHEN PASSED DATA WHICH MAY NOT BE FREEED BY IMGUI.
|
||||
// - IT WILL THEREFORE CRASH WHEN PASSED DATA WHICH MAY NOT BE FREED BY IMGUI.
|
||||
// - USE `ImFontConfig font_cfg; font_cfg.FontDataOwnedByAtlas = false; io.Fonts->AddFontFromMemoryTTF(....., &cfg);` to disable passing ownership/
|
||||
// WE WILL ADDRESS THIS IN A FUTURE REWORK OF THE API.
|
||||
if (src->FontDataOwnedByAtlas)
|
||||
|
||||
Reference in New Issue
Block a user