summaryrefslogtreecommitdiff
path: root/protocols/JabberG/jabber_userinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/jabber_userinfo.cpp')
-rw-r--r--protocols/JabberG/jabber_userinfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/jabber_userinfo.cpp b/protocols/JabberG/jabber_userinfo.cpp
index f79202ca73..b24c649e1d 100644
--- a/protocols/JabberG/jabber_userinfo.cpp
+++ b/protocols/JabberG/jabber_userinfo.cpp
@@ -388,8 +388,8 @@ static void sttFillUserInfo( CJabberProto* ppro, HWND hwndTree, JABBER_LIST_ITEM
item->itemResource.statusMessage ? item->itemResource.statusMessage : TranslateT( "<not specified>" ), sttInfoLineId(0, INFOLINE_LOGOFF_MSG));
// activity
- if ( item->lastSeenResource )
- lstrcpyn( buf, item->lastSeenResource->resourceName, SIZEOF( buf ));
+ if (( item->lastSeenResource >= 0 ) && ( item->lastSeenResource < item->resourceCount ))
+ lstrcpyn( buf, item->resource[item->lastSeenResource].resourceName, SIZEOF( buf ));
else
lstrcpyn( buf, TranslateT( "<no information available>" ), SIZEOF( buf ));