1
0

qt: invoice_list: only show invoice if it is not None

Check if the invoice is not None when the user tries to open the
invoice details to prevent an Exception, update the list instead if the
invoice hasn't been found.
It can happen that the user deletes the invoice through the CLI
and then tries to open the details in the gui, which hasn't been
updated, at the same time.
Fixes #10144
This commit is contained in:
f321x
2025-08-18 11:02:22 +02:00
parent a68bfab596
commit 9fcf5f1581

View File

@@ -143,6 +143,9 @@ class InvoiceList(MyTreeView):
def show_invoice(self, key):
invoice = self.wallet.get_invoice(key)
if not invoice:
self.update()
return
if invoice.is_lightning():
self.main_window.show_lightning_invoice(invoice)
else: