[geary] Don't crash on login failure when server response has no response code.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Don't crash on login failure when server response has no response code.
- Date: Wed, 11 Jan 2017 14:20:29 +0000 (UTC)
commit 6abd78b97d0aa7d083e0e082f43edec3c03ee520
Author: Michael James Gratton <mike vee net>
Date: Thu Jan 12 01:20:13 2017 +1100
Don't crash on login failure when server response has no response code.
Bug 777138.
* src/engine/imap-engine/imap-engine-generic-account.vala (Account):
Check the response's response_code is not null before calling it.
.../imap-engine/imap-engine-generic-account.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-generic-account.vala
b/src/engine/imap-engine/imap-engine-generic-account.vala
index cefb61a..5896743 100644
--- a/src/engine/imap-engine/imap-engine-generic-account.vala
+++ b/src/engine/imap-engine/imap-engine-generic-account.vala
@@ -966,7 +966,11 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
private async void do_login_failed_async(Geary.Credentials? credentials, Geary.Imap.StatusResponse?
response) {
bool reask_password = true;
try {
- reask_password = (response == null || response.response_code.get_response_code_type().value !=
Geary.Imap.ResponseCodeType.UNAVAILABLE);
+ reask_password = (
+ response == null ||
+ response.response_code == null ||
+ response.response_code.get_response_code_type().value !=
Geary.Imap.ResponseCodeType.UNAVAILABLE
+ );
} catch (ImapError ierr) {
debug("Unable to parse ResponseCode %s: %s", response.response_code.to_string(),
ierr.message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]