From 92be58d1d8242a4d0db029bbee9e04def086c35b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 29 Jan 2019 04:58:18 +0100 Subject: [PATCH] fix to work without display --- lv_core/lv_refr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 587b76ee8..66dc6c0a5 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -10,6 +10,7 @@ #include "lv_refr.h" #include "lv_vdb.h" #include "../lv_hal/lv_hal_tick.h" +#include "../lv_hal/lv_hal_disp.h" #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_mem.h" @@ -187,6 +188,11 @@ static void lv_refr_task(void * param) uint32_t start = lv_tick_get(); + if(lv_disp_get_active() == NULL) { + LV_LOG_TRACE("No display is registered"); + return; + } + lv_refr_join_area(); lv_refr_areas();