diff options
| author | Jean-François Milants <jf@codingfield.com> | 2021-07-25 17:55:21 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2021-07-25 17:55:21 (GMT) |
| commit | 514481ef7f9c71ad816b31d979c6ab39ce9380dd (patch) | |
| tree | 5035758f67041f22d273cb6a3384ec7777310804 /src/displayapp/screens/Tile.h | |
| parent | 7b75ca591d31ccd8883a1a1ff83cfd271959dbaa (diff) | |
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).
Diffstat (limited to 'src/displayapp/screens/Tile.h')
| -rw-r--r-- | src/displayapp/screens/Tile.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/displayapp/screens/Tile.h b/src/displayapp/screens/Tile.h index 4ebd81c..765a8de 100644 --- a/src/displayapp/screens/Tile.h +++ b/src/displayapp/screens/Tile.h @@ -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; |
