mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 18:59:01 +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.getAvatar(context);
|
||||||
draft.id = db.message().insertMessage(draft);
|
draft.id = db.message().insertMessage(draft);
|
||||||
draft.write(context, body);
|
draft.write(context, body);
|
||||||
}
|
|
||||||
|
|
||||||
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
||||||
|
}
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -215,16 +215,16 @@ public class Helper {
|
||||||
draft.getAvatar(context);
|
draft.getAvatar(context);
|
||||||
draft.id = db.message().insertMessage(draft);
|
draft.id = db.message().insertMessage(draft);
|
||||||
draft.write(context, body);
|
draft.write(context, body);
|
||||||
}
|
|
||||||
|
|
||||||
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
EntityOperation.queue(db, draft, EntityOperation.ADD);
|
||||||
|
}
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
} finally {
|
} finally {
|
||||||
db.endTransaction();
|
db.endTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
return draft.id;
|
return (draft == null ? null : draft.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue