Calling lv_msgbox_close() twice causes a reset problem

I use lv_timer_t *timer_countdown_update = lv_timer_create(countdown_update_UI, 100, NULL); to create a lv_timer. It can call countdown_update_UI() per 100ms.
In countdown_update_UI(), the msgbox obj are created in the first 100ms. msgbox obj is an obj with btn Yes, no close and a callback function.
In countdown_update_UI(), after waiting for 30 100ms, it will delete the obj by determining if the event code is LV_EVENT_DELETE, if not it will call lv_msgbox_close(msgbox_timer_mode_drop).
In the callback function, If Yes btn triggers, it will delete the msgbox obj by determining if the event code is LV_EVENT_DELETE, if not it will call lv_msgbox_close(msgbox_timer_mode_drop).
The problem now is that at the 30th 100ms, Yes was pressed at the same time, probably because lv_msgbox_close() was called twice, causing a reset.

Don’t call lv_msgbox_close () on an already closed message box object.

Set the message box object pointer to NULL after the first call of lv_msgbox_close ().
Before you call lv_msgbox_close () check whether the message box object pointer is != NULL.

Thank you for such a quick reply, now it won’t appear to reset, thanks a lot really!