mirror of https://github.com/arendst/Tasmota.git
Merge pull request #12147 from s-hadinger/lvgl_fix_fs
LVGL fix crash in file system
This commit is contained in:
commit
80189bf6f8
|
@ -148,7 +148,9 @@ lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p)
|
|||
|
||||
lv_fs_res_t res = file_p->drv->close_cb(file_p->drv, file_p->file_d);
|
||||
|
||||
if(file_p->drv->file_size != 0) { /*Is file_d zero size?*/
|
||||
lv_mem_free(file_p->file_d); /*Clean up*/
|
||||
}
|
||||
file_p->file_d = NULL;
|
||||
file_p->drv = NULL;
|
||||
|
||||
|
|
|
@ -219,7 +219,6 @@ static lv_fs_res_t lvbe_fs_open(lv_fs_drv_t * drv, void * file_p, const char * p
|
|||
// AddLog(LOG_LEVEL_INFO, "LVG: F=%*_H", sizeof(f), &f);
|
||||
if (f) {
|
||||
File * f_ptr = new File(f); // copy to dynamic object
|
||||
*f_ptr = f; // TODO is this necessary?
|
||||
*((File**)file_p) = f_ptr;
|
||||
return LV_FS_RES_OK;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue