summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/displayapp/screens/StopWatch.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp
index e06981af..d7cd20c3 100644
--- a/src/displayapp/screens/StopWatch.cpp
+++ b/src/displayapp/screens/StopWatch.cpp
@@ -115,8 +115,9 @@ bool StopWatch::Refresh() {
// Init state when an user first opens the app
// and when a stop/reset button is pressed
case States::Init: {
- if (btnStopLap) {
+ if (btnStopLap != nullptr) {
lv_obj_del(btnStopLap);
+ btnStopLap = nullptr;
}
// The initial default value
lv_label_set_text(time, "00:00");