1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00

lv_img_decoder_close: fix if closed after error

This commit is contained in:
Gabor Kiss-Vamosi 2019-07-05 15:16:02 +02:00
parent 9023588fef
commit 03f18260a9

View File

@ -173,8 +173,10 @@ lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_c
*/ */
void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc) void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc)
{ {
if(dsc->decoder) {
if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc); if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc);
} }
}
/** /**
* Create a new image decoder * Create a new image decoder