From 203d349f1de7b7730c924fc6958ab936ebbb3aa9 Mon Sep 17 00:00:00 2001 From: j-dimension Date: Sun, 8 Dec 2024 23:28:26 +0100 Subject: [PATCH] fix NPE when from of a message is null. issue #2724 --- .../com/jdimension/jlawyer/client/mail/MailContentUI.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java index 39432e8a8..121082e5f 100755 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/mail/MailContentUI.java @@ -1166,7 +1166,10 @@ public static void setMessageImpl(MailContentUI contentUI, Message msg, MailboxS lblSentDate.setText(sentString); lblSubject.setText(copiedMsg.getSubject()); lblSubject.setToolTipText("Klicken, um in Zwischenablage zu kopieren:" + System.lineSeparator() + lblSubject.getText()); - lblFrom.setText(MimeUtility.decodeText(copiedMsg.getFrom()[0].toString())); + if(copiedMsg.getFrom()!=null && copiedMsg.getFrom().length>0) + lblFrom.setText(MimeUtility.decodeText(copiedMsg.getFrom()[0].toString())); + else + lblFrom.setText(""); lblFrom.setToolTipText("Klicken, um in Zwischenablage zu kopieren:" + System.lineSeparator() + lblFrom.getText()); String to = "";