mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
Prevent crash
This commit is contained in:
parent
2ef0ab5357
commit
2a3c4e6b93
1 changed files with 2 additions and 1 deletions
|
@ -348,7 +348,8 @@ public class MailService implements AutoCloseable {
|
||||||
} else
|
} else
|
||||||
throw new NoSuchProviderException(protocol);
|
throw new NoSuchProviderException(protocol);
|
||||||
} catch (MessagingException ex) {
|
} catch (MessagingException ex) {
|
||||||
if (ex.getCause() instanceof SSLHandshakeException &&
|
if (factory != null &&
|
||||||
|
ex.getCause() instanceof SSLHandshakeException &&
|
||||||
ex.getCause().getCause() instanceof CertificateException)
|
ex.getCause().getCause() instanceof CertificateException)
|
||||||
throw new UntrustedException(factory.getFingerPrint(), ex);
|
throw new UntrustedException(factory.getFingerPrint(), ex);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue