aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/imap/MCIMAPSession.cpp
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2017-03-24 22:35:07 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2017-03-24 22:35:17 -0700
commit65bc5a2c045c38b35709964be614f5ceabc637ed (patch)
tree807246dcd3d010466d799b27646dafce1c338b18 /src/core/imap/MCIMAPSession.cpp
parent8ead0afefcde1f81d7a55e1b4c3224582188471c (diff)
Fixed some crashes
Diffstat (limited to 'src/core/imap/MCIMAPSession.cpp')
-rw-r--r--src/core/imap/MCIMAPSession.cpp11
1 files changed, 8 insertions, 3 deletions
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");