Add Clear Fonts to Clear Pages button in File Editor

This commit is contained in:
fvanroie 2022-04-25 19:42:32 +02:00
parent c0db202eb6
commit 34cb3e8bd1
2 changed files with 5 additions and 1 deletions

View File

@ -612,6 +612,7 @@ IRAM_ATTR void haspLoop(void)
void hasp_init(void)
{
haspPages.init(haspStartPage); // StartPage is used for the BACK action
font_clear_list(); // free TTF resources
}
void hasp_load_json(void)

View File

@ -76,7 +76,10 @@ void font_clear_list()
}
/* Free the allocated font_name last */
hasp_free(font_p->payload);
if(font_p->payload) {
LOG_DEBUG(TAG_FONT, F("Released font %s"), font_p->payload);
hasp_free(font_p->payload);
}
_lv_ll_remove(&hasp_fonts_ll, node);
lv_mem_free(node);