diff options
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 4 |
2 files changed, 8 insertions, 4 deletions
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"))
|