summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-22 21:34:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-22 21:34:12 +0000
commita7c0a023987fe8a04cef052c68c507fb3c2f7d74 (patch)
tree565016a29c22b35cffebb95b462a690a6f858e69
parentfff6c9fc6c8ce7d5fc2aff3444073f4a6069944d (diff)
one more fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@6190 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index d5fbce60c3..81b8a6d04d 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -362,23 +362,24 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM
}
// logoff
- if (item->m_pItemResource->m_dwIdleStartTime > 0) {
- lstrcpyn(buf, _tctime(&item->m_pItemResource->m_dwIdleStartTime), SIZEOF(buf));
- int len = lstrlen(buf);
- if (len > 0) buf[len-1] = 0;
- }
- else if ( !item->m_pItemResource->m_dwIdleStartTime)
- lstrcpyn(buf, TranslateT("unknown"), SIZEOF(buf));
- else
- lstrcpyn(buf, TranslateT("<not specified>"), SIZEOF(buf));
+ if (item->m_pItemResource) {
+ if (item->m_pItemResource->m_dwIdleStartTime > 0) {
+ lstrcpyn(buf, _tctime(&item->m_pItemResource->m_dwIdleStartTime), SIZEOF(buf));
+ int len = lstrlen(buf);
+ if (len > 0) buf[len-1] = 0;
+ }
+ else if ( !item->m_pItemResource->m_dwIdleStartTime)
+ lstrcpyn(buf, TranslateT("unknown"), SIZEOF(buf));
+ else
+ lstrcpyn(buf, TranslateT("<not specified>"), SIZEOF(buf));
- sttFillInfoLine(hwndTree, htiRoot, NULL,
- (item->jid && _tcschr(item->jid, _T('@'))) ? TranslateT("Last logoff time") : TranslateT("Uptime"), buf,
- sttInfoLineId(0, INFOLINE_LOGOFF));
+ sttFillInfoLine(hwndTree, htiRoot, NULL,
+ (item->jid && _tcschr(item->jid, _T('@'))) ? TranslateT("Last logoff time") : TranslateT("Uptime"), buf,
+ sttInfoLineId(0, INFOLINE_LOGOFF));
- // logoff msg
- sttFillInfoLine(hwndTree, htiRoot, NULL, TranslateT("Logoff message"),
- item->m_pItemResource->m_tszStatusMessage ? item->m_pItemResource->m_tszStatusMessage : TranslateT("<not specified>"), sttInfoLineId(0, INFOLINE_LOGOFF_MSG));
+ sttFillInfoLine(hwndTree, htiRoot, NULL, TranslateT("Logoff message"),
+ item->m_pItemResource->m_tszStatusMessage ? item->m_pItemResource->m_tszStatusMessage : TranslateT("<not specified>"), sttInfoLineId(0, INFOLINE_LOGOFF_MSG));
+ }
// activity
if (item->m_pLastSeenResource)