diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 537859fef..5f402695d 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -2643,7 +2643,7 @@ class LNWallet(LNWorker): self.logger.info(f"received unknown htlc_failed, probably from previous session (phash={payment_hash.hex()})") key = payment_hash.hex() invoice = self.wallet.get_invoice(key) - if self.get_invoice_status(invoice) != PR_UNPAID: + if invoice and self.get_invoice_status(invoice) != PR_UNPAID: self.set_invoice_status(key, PR_UNPAID) util.trigger_callback('payment_failed', self.wallet, key, '')