mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
e4632f3ba9
commit
e9521e20a1
|
@ -276,6 +276,8 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
|
||||||
db.beginTransaction();
|
db.beginTransaction();
|
||||||
|
|
||||||
EntityMessage message = db.message().getMessage(mid);
|
EntityMessage message = db.message().getMessage(mid);
|
||||||
|
if (message == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (rule.matches(context, message, null))
|
if (rule.matches(context, message, null))
|
||||||
if (rule.execute(context, message))
|
if (rule.execute(context, message))
|
||||||
|
|
|
@ -1160,6 +1160,8 @@ public class FragmentRule extends FragmentBase {
|
||||||
db.message().getMessageIdsByFolder(rule.folder, null, null, null);
|
db.message().getMessageIdsByFolder(rule.folder, null, null, null);
|
||||||
for (long id : ids) {
|
for (long id : ids) {
|
||||||
EntityMessage message = db.message().getMessage(id);
|
EntityMessage message = db.message().getMessage(id);
|
||||||
|
if (message == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (rule.matches(context, message, null))
|
if (rule.matches(context, message, null))
|
||||||
matching.add(message);
|
matching.add(message);
|
||||||
|
|
Loading…
Reference in New Issue