diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-05 11:10:32 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-05 11:10:32 +0000 |
commit | 6c5b2ecc6f9e1a7968e4eab4d2e1eeed4f82d1f0 (patch) | |
tree | f63019e4dd418ba6357d55d1b690f05820745dcc /protocols/VKontakte/src/vk_proto.cpp | |
parent | dfe76cf65e6f20d5f9c92982a241ffecf6bb3405 (diff) |
VKontakte:
fix(???) for empty contact name on friend request (attempt 3)
fix memory leaks
git-svn-id: http://svn.miranda-ng.org/main/trunk@12006 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 1ab60f23fa..d8215f969e 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -317,7 +317,7 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) {
LONG userID = getDword(hContact, "ID", -1);
bool bisFriend = (getByte(hContact, "Auth", -1) == 0);
- bool bisBroadcast = !(CMString(db_get_tsa(hContact, m_szModuleName, "AudioUrl")).IsEmpty());
+ bool bisBroadcast = !(CMString(ptrT(db_get_tsa(hContact, m_szModuleName, "AudioUrl"))).IsEmpty());
Menu_ShowItem(g_hContactMenuItems[CMI_VISITPROFILE], !isChatRoom(hContact));
Menu_ShowItem(g_hContactMenuItems[CMI_ADDASFRIEND], !bisFriend && !isChatRoom(hContact) && userID != VK_FEED_USER);
Menu_ShowItem(g_hContactMenuItems[CMI_DELETEFRIEND], bisFriend && userID != VK_FEED_USER);
@@ -658,7 +658,7 @@ void CVkProto::OnReceiveAuthRequest(NETLIBHTTPREQUEST *reply, AsyncHttpRequest * if (iRet == 2) {
CMString msg,
msgformat = TranslateT("User %s added as friend"),
- tszNick = db_get_tsa(param->hContact, m_szModuleName, "Nick");
+ tszNick = ptrT(db_get_tsa(param->hContact, m_szModuleName, "Nick"));
if (tszNick.IsEmpty())
tszNick = TranslateT("(Unknown contact)");
msg.AppendFormat(msgformat, tszNick.GetBuffer());
|