From 475d817e0230342443203f3b9b3dfe2a45a71779 Mon Sep 17 00:00:00 2001 From: "Hoa V. DINH" Date: Thu, 11 Dec 2014 14:24:03 -0800 Subject: Fixed analyzer issues and warnings (#993 and fixed #992) --- src/async/imap/MCIMAPAsyncConnection.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/async/imap/MCIMAPAsyncConnection.cpp') diff --git a/src/async/imap/MCIMAPAsyncConnection.cpp b/src/async/imap/MCIMAPAsyncConnection.cpp index b2fc24c3..c03422ff 100755 --- a/src/async/imap/MCIMAPAsyncConnection.cpp +++ b/src/async/imap/MCIMAPAsyncConnection.cpp @@ -239,8 +239,11 @@ IMAPNamespace * IMAPAsyncConnection::defaultNamespace() void IMAPAsyncConnection::setClientIdentity(IMAPIdentity * identity) { MC_SAFE_REPLACE_COPY(IMAPIdentity, mClientIdentity, identity); - mc_foreacharray(String, key, identity->allInfoKeys()) { - mSession->clientIdentity()->setInfoForKey(key, identity->infoForKey(key)); + mSession->clientIdentity()->removeAllInfos(); + if (identity != NULL) { + mc_foreacharray(String, key, identity->allInfoKeys()) { + mSession->clientIdentity()->setInfoForKey(key, identity->infoForKey(key)); + } } } -- cgit v1.2.3