Closes #6935 Don't crash when user cancels password dialog
This commit is contained in:
parent
d79b3ef3b0
commit
61335f1159
1 changed files with 5 additions and 0 deletions
|
|
@ -647,6 +647,11 @@ public class Geary.Imap.ClientSession : BaseObject {
|
|||
*/
|
||||
public async StatusResponse login_async(Geary.Credentials credentials, Cancellable? cancellable = null)
|
||||
throws Error {
|
||||
if (!credentials.is_complete()) {
|
||||
login_failed();
|
||||
throw new ImapError.UNAUTHENTICATED("No credentials provided for account: %s", credentials.to_string());
|
||||
}
|
||||
|
||||
LoginCommand cmd = new LoginCommand(credentials.user, credentials.pass);
|
||||
|
||||
MachineParams params = new MachineParams(cmd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue