mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-05 03:36:13 +00:00
Fix null pointer dereferences in SettingsScreen index helpers
lowBatIndex(), autoOffIndex(), gpsIntervalIndex() each called getNodePrefs() independently without null check, while renderItem() had its own guarded copy. Added null checks consistent with the rest of the class. Also initialize _node_prefs to NULL in UITask constructor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
35b2b008c8
commit
4e83e99316
@@ -68,7 +68,7 @@ class UITask : public AbstractUITask {
|
||||
|
||||
public:
|
||||
|
||||
UITask(mesh::MainBoard* board, BaseSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL) {
|
||||
UITask(mesh::MainBoard* board, BaseSerialInterface* serial) : AbstractUITask(board, serial), _display(NULL), _sensors(NULL), _node_prefs(NULL) {
|
||||
next_batt_chck = _next_refresh = 0;
|
||||
ui_started_at = 0;
|
||||
_batt_mv = 0;
|
||||
|
||||
Reference in New Issue
Block a user