diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-12-11 14:24:03 -0800 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-12-11 14:24:03 -0800 |
commit | 475d817e0230342443203f3b9b3dfe2a45a71779 (patch) | |
tree | 74803f62785a268e477fb82f96f98fc7e65f1686 /src/async/imap | |
parent | 129a55d2098fbb114fcb7e785b31ce270e9cfda0 (diff) |
Fixed analyzer issues and warnings (#993 and fixed #992)
Diffstat (limited to 'src/async/imap')
-rwxr-xr-x | src/async/imap/MCIMAPAsyncConnection.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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)); + } } } |