Merge pull request #324 from MFAshby/fix_stop_crash_315

Fix stopwatch crash after stop pressed
This commit is contained in:
JF002 2021-05-09 11:17:05 +02:00 committed by GitHub
commit 937dc340f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");