summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_std.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN/src/msn_std.cpp')
-rw-r--r--protocols/MSN/src/msn_std.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp
index c0dfa87833..8950d469cb 100644
--- a/protocols/MSN/src/msn_std.cpp
+++ b/protocols/MSN/src/msn_std.cpp
@@ -52,8 +52,10 @@ TCHAR* CMsnProto::GetContactNameT(MCONTACT hContact)
ci.cbSize = sizeof(ci);
ci.dwFlag = CNF_DISPLAY | CNF_TCHAR;
ci.szProto = m_szModuleName;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci))
- return (TCHAR*)ci.pszVal;
+ if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) {
+ if (m_DisplayNameCache) mir_free(m_DisplayNameCache);
+ return (TCHAR*)m_DisplayNameCache = ci.pszVal;
+ }
else
return _T("Me");
}