aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index c2cf43e6..93427d8d 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -1000,6 +1000,10 @@ String * IMAPSession::customCommand(String * command, ErrorCode * pError)
{
int r;
+ loginIfNeeded(pError);
+ if (* pError != ErrorNone)
+ return NULL;
+
r = mailimap_custom_command(mImap, MCUTF8(command));
if (r == MAILIMAP_ERROR_STREAM) {
mShouldDisconnect = true;