summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-05-09 11:17:05 +0200
committerGitHub <noreply@github.com>2021-05-09 11:17:05 +0200
commit937dc340f17f533ebda28456983bf6c7364aff32 (patch)
treecbdbe60355e2154e9d92b4d2dc3a62b958053fb2 /src
parente3ead332b9db3ad7b6acde933b6a7943b3ac81e2 (diff)
parent3a938236d48430cb77660f15d712f7bc129d9539 (diff)
Merge pull request #324 from MFAshby/fix_stop_crash_315
Fix stopwatch crash after stop pressed
Diffstat (limited to 'src')
-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");