From 6c5b2ecc6f9e1a7968e4eab4d2e1eeed4f82d1f0 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Thu, 5 Feb 2015 11:10:32 +0000 Subject: 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 --- protocols/VKontakte/src/vk_proto.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/VKontakte/src/vk_proto.cpp') 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()); -- cgit v1.2.3