From 333acae43950c5c9a28513e5530cf8759771872c Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 26 Oct 2023 15:20:49 +0530 Subject: [PATCH] fix(core): Reject callback sanity check causing unintended ui --- src/wallet/reconstruct_wallet_flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wallet/reconstruct_wallet_flow.c b/src/wallet/reconstruct_wallet_flow.c index 67b9f5be..0c7a828a 100644 --- a/src/wallet/reconstruct_wallet_flow.c +++ b/src/wallet/reconstruct_wallet_flow.c @@ -267,8 +267,10 @@ static reconstruct_state_e reconstruct_wallet_handler(reconstruct_state_e state, * we need to inform the host on the type of card error due to which * operation was aborted, as these are non-recoverable. */ - reject_cb(ERROR_COMMON_ERROR_CARD_ERROR_TAG, - get_card_error_from_nfc_status(card_error_code)); + if (reject_cb) { + reject_cb(ERROR_COMMON_ERROR_CARD_ERROR_TAG, + get_card_error_from_nfc_status(card_error_code)); + } next_state = COMPLETED_WITH_ERRORS; }