Skip to content

Commit e55ebd8

Browse files
authored
Reconfigured null check to overcome NPEs triggered by .getDomainId() (#394)
1 parent 5e26d77 commit e55ebd8

File tree

1 file changed

+6
-2
lines changed
  • bundles/ch.framsteg.elexis.labor.teamw/src/ch/framsteg/elexis/labor/teamw/views

1 file changed

+6
-2
lines changed

bundles/ch.framsteg.elexis.labor.teamw/src/ch/framsteg/elexis/labor/teamw/views/LabordersView.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,13 @@ private void updateControls(ICoverage coverage) {
236236
}
237237

238238
if (coverage.getCostBearer() != null) {
239-
txtCaseInsuranceEAN.setText(coverage.getCostBearer()
240-
.getXid(getApplicationProperties().getProperty(APP_CFG_XID_EAN)).getDomainId());
239+
txtCaseInsuranceEAN.setText(
240+
coverage.getCostBearer().getXid(getApplicationProperties().getProperty(APP_CFG_XID_EAN)) != null
241+
? coverage.getCostBearer().getXid(getApplicationProperties().getProperty(APP_CFG_XID_EAN))
242+
.getDomainId()
243+
: "");
241244
}
245+
242246
if (txtCaseInsuranceEAN.getText().isEmpty()) {
243247
txtCaseInsuranceEAN.setBackground(getMarkedBackgroundColor());
244248
txtCaseInsuranceEAN.setText(getMessagesProperties().getProperty(MSG_EMPTY_FIELD));

0 commit comments

Comments
 (0)