mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 01:51:24 +01:00
Prevent crash
This commit is contained in:
@@ -348,7 +348,8 @@ public class MailService implements AutoCloseable {
|
||||
} else
|
||||
throw new NoSuchProviderException(protocol);
|
||||
} catch (MessagingException ex) {
|
||||
if (ex.getCause() instanceof SSLHandshakeException &&
|
||||
if (factory != null &&
|
||||
ex.getCause() instanceof SSLHandshakeException &&
|
||||
ex.getCause().getCause() instanceof CertificateException)
|
||||
throw new UntrustedException(factory.getFingerPrint(), ex);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user