diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-23 18:25:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-23 18:25:34 +0000 |
commit | 8955f0e5c3c236dd5b38f8ba3628f31cce798299 (patch) | |
tree | fdc5e754f7a31036ddebf7d9cf65d7ab2af2de0e /protocols | |
parent | e7d83ac464a137c2cf584fc9ffdff2d758a4f3d6 (diff) |
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@5459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 2abab23957..7f3a953551 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -931,15 +931,17 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen) TCHAR *p = _tcschr(dest, '/');
JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid);
- if (LI && LI->resourceCount == 1 && !lstrcmp(LI->pResources->szCapsNode, _T("http://talk.google.com/xmpp/bot/caps"))) {
- if (p) *p = 0;
- return dest;
- }
+ if (LI != NULL) {
+ if (LI->resourceCount == 1 && !lstrcmp(LI->pResources->szCapsNode, _T("http://talk.google.com/xmpp/bot/caps"))) {
+ if (p) *p = 0;
+ return dest;
+ }
- if (p == NULL) {
- JABBER_RESOURCE_STATUS *r = LI->getBestResource();
- if (r != NULL)
- mir_sntprintf(dest, destLen, _T("%s/%s"), jid, r->resourceName);
+ if (p == NULL) {
+ JABBER_RESOURCE_STATUS *r = LI->getBestResource();
+ if (r != NULL)
+ mir_sntprintf(dest, destLen, _T("%s/%s"), jid, r->resourceName);
+ }
}
return dest;
|