event fixes: crashed when the obj was deleted in nested events

This commit is contained in:
Gabor Kiss-Vamosi
2019-04-28 17:26:18 +02:00
parent 12ee3b3504
commit 1e4fd8fdfb
5 changed files with 34 additions and 13 deletions

View File

@@ -571,6 +571,15 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data);
*/
const void * lv_event_get_data(void);
/**
* Mark the current object in the event as deleted.
* It not required in the general cases because the library will take care of it.
* However if an event is sent manually to an other object from an event where the object is deleted
* the library will not know about the deletion (because it happened in an other object's event).
* In this specific case the object need to be marked as deleted manually.
*/
void lv_event_mark_as_deleted(void);
/**
* Set the a signal function of an object. Used internally by the library.
* Always call the previous signal function in the new.