Skip to content

Commit

Permalink
lvgldemo: add LVGL duplicate initialization protection
Browse files Browse the repository at this point in the history
Signed-off-by: pengyiqiang <[email protected]>
  • Loading branch information
pengyiqiang authored and xiaoxiang781216 committed Dec 2, 2024
1 parent 296d5d1 commit ce217b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/lvgldemo/lvgldemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ int main(int argc, FAR char *argv[])
lv_memzero(&ui_loop, sizeof(ui_loop));
#endif

if (lv_is_initialized())
{
LV_LOG_ERROR("LVGL already initialized! aborting.");
return -1;
}

#ifdef NEED_BOARDINIT
/* Perform board-specific driver initialization */

Expand Down

0 comments on commit ce217b8

Please sign in to comment.