From 65bc5a2c045c38b35709964be614f5ceabc637ed Mon Sep 17 00:00:00 2001 From: "Hoa V. DINH" Date: Fri, 24 Mar 2017 22:35:07 -0700 Subject: Fixed some crashes --- src/core/imap/MCIMAPSession.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/core/imap/MCIMAPSession.cpp') diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp index 4cfcfa95..4d23da60 100644 --- a/src/core/imap/MCIMAPSession.cpp +++ b/src/core/imap/MCIMAPSession.cpp @@ -644,11 +644,16 @@ void IMAPSession::connect(ErrorCode * pError) int r; setup(); - + MCLog("connect %s", MCUTF8DESC(this)); - + MCAssert(mState == STATE_DISCONNECTED); - + + if (mHostname == NULL) { + * pError = ErrorConnection; + goto close; + } + switch (mConnectionType) { case ConnectionTypeStartTLS: MCLog("STARTTLS connect"); -- cgit v1.2.3