1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-03 10:16:45 +00:00

Prevent crash

This commit is contained in:
M66B 2019-02-28 10:03:03 +00:00
parent b4742a2072
commit f667d17a83

View file

@ -242,14 +242,15 @@ public class ServiceUI extends IntentService {
Log.i("Synchronize on demand folder=" + fid);
DB db = DB.getInstance(this);
EntityFolder folder = null;
EntityAccount account = null;
EntityFolder folder = db.folder().getFolder(fid);
if (folder == null)
return;
EntityAccount account = db.account().getAccount(folder.account);
if (account == null)
return;
Store istore = null;
try {
folder = db.folder().getFolder(fid);
account = db.account().getAccount(folder.account);
// Create session
Properties props = MessageHelper.getSessionProperties(account.auth_type, account.realm, account.insecure);
final Session isession = Session.getInstance(props, null);