From 51ad6fde635ea61948b872071b864c50d7ac8dc5 Mon Sep 17 00:00:00 2001 From: ArnaudFofou Date: Wed, 20 Nov 2024 17:42:46 +0100 Subject: [PATCH] fix NullPointerException on edit bill --- src/main/java/org/isf/accounting/gui/PatientBillEdit.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/isf/accounting/gui/PatientBillEdit.java b/src/main/java/org/isf/accounting/gui/PatientBillEdit.java index ac3c2a3496..23349004c3 100644 --- a/src/main/java/org/isf/accounting/gui/PatientBillEdit.java +++ b/src/main/java/org/isf/accounting/gui/PatientBillEdit.java @@ -897,7 +897,9 @@ private void setJButtonPickPatient() { jButtonPickPatient.setText(MessageBundle.getMessage("angal.newbill.changepatient.btn")); jButtonPickPatient.setMnemonic(MessageBundle.getMnemonic("angal.newbill.changepatient.btn.key")); jButtonPickPatient.setToolTipText(MessageBundle.getMessage("angal.newbill.changethepatientassociatedwiththisbill.tooltip")); - jButtonTrashPatient.setEnabled(true); + if (jButtonTrashPatient != null) { + jButtonTrashPatient.setEnabled(true); + } } }