summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-10-25 18:32:59 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-10-25 18:32:59 -0400
commit88f41b12fc99542e2ace7b63651971e5907cfd1d (patch)
tree8189b0896a4992a65e7354b86955dbab63e37e57
parentf98bc9bb4ebdab19834a7dd1c8cd8984181d3d3e (diff)
downloadSensor-Watch-88f41b12fc99542e2ace7b63651971e5907cfd1d.tar.gz
Sensor-Watch-88f41b12fc99542e2ace7b63651971e5907cfd1d.tar.bz2
Sensor-Watch-88f41b12fc99542e2ace7b63651971e5907cfd1d.zip
don't destroy our temperature log when waking from sleep
-rw-r--r--movement/watch_faces/thermistor/thermistor_logging_face.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/movement/watch_faces/thermistor/thermistor_logging_face.c b/movement/watch_faces/thermistor/thermistor_logging_face.c
index 5351ce88..3e9e62b3 100644
--- a/movement/watch_faces/thermistor/thermistor_logging_face.c
+++ b/movement/watch_faces/thermistor/thermistor_logging_face.c
@@ -50,8 +50,10 @@ void _thermistor_logging_face_update_display(thermistor_logger_state_t *logger_s
void thermistor_logging_face_setup(movement_settings_t *settings, void ** context_ptr) {
(void) settings;
- if (*context_ptr == NULL) *context_ptr = malloc(sizeof(thermistor_logger_state_t));
- memset(*context_ptr, 0, sizeof(thermistor_logger_state_t));
+ if (*context_ptr == NULL) {
+ *context_ptr = malloc(sizeof(thermistor_logger_state_t));
+ memset(*context_ptr, 0, sizeof(thermistor_logger_state_t));
+ }
}
void thermistor_logging_face_activate(movement_settings_t *settings, void *context) {