In the CLI mode, the user is supposed to attach a file to a draft. If the user attaches a file to a contact (assuming that the file will be sent on its own) pond will crash with nil pointer dereference.
This is because the code doesn't return after the following error case (there was no draft to attach to):
case attachCommand:
draft, ok := c.currentObj.(*Draft)
if !ok {
c.Printf("%s Select draft first\n", termWarnPrefix)
}
This seems to be the case also in the removeCommand case.
In the CLI mode, the user is supposed to attach a file to a draft. If the user attaches a file to a contact (assuming that the file will be sent on its own) pond will crash with nil pointer dereference.
This is because the code doesn't return after the following error case (there was no draft to attach to):
This seems to be the case also in the
removeCommand
case.