diff options
Diffstat (limited to 'src/mir_app/src/proto_opts.cpp')
-rw-r--r-- | src/mir_app/src/proto_opts.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index 1f5913d960..969e9411ea 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -700,13 +700,15 @@ BOOL CAccountListCtrl::OnDrawItem(DRAWITEMSTRUCT *lps) lps->rcItem.top += sz.cy + 2;
if (acc->ppro && Proto_IsProtocolLoaded(acc->szProtoName)) {
- char *szIdName = (char *)acc->ppro->GetCaps(PFLAG_UNIQUEIDTEXT, 0);
- ptrW tszIdName(szIdName ? mir_a2u(szIdName) : mir_wstrdup(TranslateT("Account ID")));
+ wchar_t *wszIdName = (wchar_t *)acc->ppro->GetCaps(PFLAG_UNIQUEIDTEXT, 0);
+ if (wszIdName == nullptr)
+ wszIdName = TranslateT("Account ID");
+
ptrW tszUniqueID(Contact_GetInfo(CNF_UNIQUEID, 0, acc->szModuleName));
if (tszUniqueID != nullptr)
- text.Format(L"%s: %s", tszIdName.get(), tszUniqueID.get());
+ text.Format(L"%s: %s", wszIdName, tszUniqueID.get());
else
- text.Format(L"%s: %s", tszIdName.get(), TranslateT("<unknown>"));
+ text.Format(L"%s: %s", wszIdName, TranslateT("<unknown>"));
}
else text.Format(TranslateT("Protocol is not loaded."));
|