This commit is contained in:
Kovid Goyal 2026-10-24 06:28:36 +05:30
parent 07c8731470
commit 89db933a24
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 0 deletions

View file

@ -450,6 +450,9 @@ Detailed list of changes
or too thick when zoomed out. At the configured :opt:`font_size` nothing
changes (:iss:`10362`)
- Fix a use-after-free that could cause a crash when reloading the config after
changing font settings (:iss:`10729`)
0.49.2 [2026-10-01]

View file

@ -573,6 +573,9 @@ init_font(Font *f, PyObject *face, bool bold, bool italic, bool emoji_presentati
static void
free_font_groups(void) {
if (font_groups) {
// Clear dangling pointers into font_groups, otherwise the next call to
// save_window_font_groups() would read freed memory
for (size_t o = 0; o < global_state.num_os_windows; o++) global_state.os_windows[o].fonts_data = NULL;
for (size_t i = 0; i < num_font_groups; i++) del_font_group(font_groups + i);
free(font_groups);
font_groups = NULL;