pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
607 stars 91 forks source link

Font memory deallocation problem #2

Closed chengts95 closed 3 years ago

chengts95 commented 4 years ago

The user loaded fonts throw an exception in debug mode on windows 10.

ucrtbased.dll!00007ffc46341bc0() (Unknown Source:0)
ucrtbased.dll!00007ffc463451c5() (Unknown Source:0)
ucrtbased.dll!00007ffc463458c8() (Unknown Source:0)
hello.exe!FreeWrapper(void * ptr, void * user_data) Line 1019 (hello_imgui\external\imgui\imgui.cpp:1019)
:288)
static void    FreeWrapper(void* ptr, void* user_data)        { IM_UNUSED(user_data); free(ptr); }
pthom commented 3 years ago

Thanks for letting me know. This commit (https://github.com/pthom/hello_imgui/commit/c74f7d0dcd7fba8a8b9c5088f6c4be66abcebe44) fixes it.