upas/Mail: check if plumb attrs are nil

This commit is contained in:
Ori Bernstein 2022-07-13 21:01:11 +00:00
parent 62a4e64d31
commit 8f1954c0dd

View file

@ -802,6 +802,8 @@ changemesg(Plumbmsg *pm)
digest = plumblookup(pm->attr, "digest"); digest = plumblookup(pm->attr, "digest");
action = plumblookup(pm->attr, "mailtype"); action = plumblookup(pm->attr, "mailtype");
if(digest == nil || action == nil)
return;
if(strcmp(action, "new") == 0){ if(strcmp(action, "new") == 0){
if((m = load(pm->data, digest, 1)) == nil) if((m = load(pm->data, digest, 1)) == nil)
return; return;