From a8e3f5a0a5ebc0afeacd9ddcf00abef85b5a27dd Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 7 Jan 2024 13:17:14 +0100 Subject: [PATCH] fix(refr): update checking for a valid draw buffer (#5210) --- src/core/lv_refr.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 23d404656..a62395caa 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -345,11 +345,7 @@ void _lv_display_refr_timer(lv_timer_t * tmr) return; } - if(disp_refr->buf_act->data_size == 0) { - LV_LOG_WARN("disp->buf_size_in_bytes is 0"); - return; - } - if(disp_refr->buf_1.data == NULL) { + if(disp_refr->buf_act == NULL || disp_refr->buf_act->data == NULL || disp_refr->buf_act->data_size == 0) { LV_LOG_WARN("No draw buffer"); return; }