null initialize total sensor for pulse counter (#3803)

* null initialize total sensor.

* pedantic styling fix

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
RoboMagus 2022-09-14 15:01:28 +02:00 committed by GitHub
parent 88943103a2
commit 6a8f4e92df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ class PulseCounterSensor : public sensor::Sensor, public PollingComponent {
PulseCounterStorageBase &storage_;
uint32_t last_time_{0};
uint32_t current_total_{0};
sensor::Sensor *total_sensor_;
sensor::Sensor *total_sensor_{nullptr};
};
} // namespace pulse_counter