mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 02:37:16 +00:00
Prevent crash
This commit is contained in:
parent
fd79a9a8ad
commit
d813e8129b
2 changed files with 5 additions and 5 deletions
|
@ -560,9 +560,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
draft.getAvatar(context);
|
||||
draft.id = db.message().insertMessage(draft);
|
||||
draft.write(context, body);
|
||||
}
|
||||
|
||||
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
||||
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
|
|
|
@ -215,16 +215,16 @@ public class Helper {
|
|||
draft.getAvatar(context);
|
||||
draft.id = db.message().insertMessage(draft);
|
||||
draft.write(context, body);
|
||||
}
|
||||
|
||||
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
||||
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
return draft.id;
|
||||
return (draft == null ? null : draft.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue