Tile event handler : read the event data only if the event is a "value changed event". LVGL sends many other event and some of them do not set the event data (global static variable) to a valid address, which may cause an invalid read. I noticed that when porting this class on RISC-V platform (BL602).

This commit is contained in:
Jean-François Milants
2021-07-25 19:55:21 +02:00
parent 7b75ca591d
commit 514481ef7f
2 changed files with 11 additions and 9 deletions

View File

@@ -32,7 +32,7 @@ namespace Pinetime {
bool Refresh() override;
void UpdateScreen();
void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId);
void OnValueChangedEvent(lv_obj_t* obj, uint32_t buttonId);
private:
Pinetime::Controllers::Battery& batteryController;