From a1780154df0ab678b2002dbdc0cc4114ebe406ec Mon Sep 17 00:00:00 2001 From: aanper Date: Wed, 21 Oct 2020 13:52:51 +0300 Subject: [PATCH] not start worker if err --- applications/nfc/nfc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/nfc/nfc.c b/applications/nfc/nfc.c index c47a4ae4..21da2562 100644 --- a/applications/nfc/nfc.c +++ b/applications/nfc/nfc.c @@ -187,10 +187,12 @@ void nfc_test_callback(void* context) { Nfc* nfc = context; dispatcher_lock(nfc->dispatcher); + + nfc->screen = 0; + widget_enabled_set(nfc->widget, true); - if(!nfc->worker) { - nfc->screen = 0; - widget_enabled_set(nfc->widget, true); + if(nfc->ret == ERR_NONE && !nfc->worker) { + // TODO change to fuirac_start nfc->worker = osThreadNew(nfc_worker_task, nfc, &nfc->worker_attr); }