From 96ac0b0639e1c6396cb084349f9361a1c34ddb57 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Jul 2023 16:33:54 +0300 Subject: =?UTF-8?q?fixes=20#3581=20(Jabber:=20=D0=B7=D0=B0=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=B8=D0=BD=D0=B0=D1=82=D1=8C=20=D0=B2=D1=8B=D0=B1=D0=BE?= =?UTF-8?q?=D1=80=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8F=20=D0=B2=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA?= =?UTF-8?q?=D0=B5,=20=D0=B0=20=D1=82=D0=B0=D0=BA=D0=B6=D0=B5=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B1=D1=80=D0=B0=D0=BD=D0=BD=D1=83=D1=8E=20=D1=81=D0=BB?= =?UTF-8?q?=D1=83=D0=B6=D0=B1=D1=83=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/JabberG/src/jabber_proto.cpp | 8 ++++---- protocols/JabberG/src/jabber_search.cpp | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index bdf00f50e9..61f27ddab6 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -754,8 +754,8 @@ HANDLE CJabberProto::SearchBasic(const wchar_t *szJid) HANDLE CJabberProto::SearchByEmail(const wchar_t *email) { - ptrA szServerName(getStringA("Jud")); - if (!m_bJabberOnline || email == nullptr || szServerName == nullptr) + CMStringA szServerName(getMStringA("Jud")); + if (!m_bJabberOnline || email == nullptr || szServerName.IsEmpty()) return nullptr; CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, szServerName); @@ -768,8 +768,8 @@ HANDLE CJabberProto::SearchByEmail(const wchar_t *email) HANDLE CJabberProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) { - ptrA szServerName(getStringA("Jud")); - if (!m_bJabberOnline || szServerName == nullptr) + CMStringA szServerName(getMStringA("Jud")); + if (!m_bJabberOnline || szServerName.IsEmpty()) return nullptr; CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultExtSearch, JABBER_IQ_TYPE_SET, szServerName); diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 98d418a548..49f555fd47 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -700,6 +700,10 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR HWND CJabberProto::CreateExtendedSearchUI(HWND parent) { + CMStringA szServerName(getMStringA("Jud")); + if (!m_bJabberOnline || szServerName.IsEmpty()) + return nullptr; + if (parent && g_plugin.getInst()) { ptrW szServer(getWStringA("LoginServer")); if (szServer == nullptr || mir_wstrcmpi(szServer, L"S.ms")) -- cgit v1.2.3