From 23a09a681153a5d298bcac9d68f8288198c2d518 Mon Sep 17 00:00:00 2001 From: Piotr Piastucki Date: Mon, 28 Dec 2015 17:19:49 +0000 Subject: MSN: Fix for cases where place->client of contact's place is 0. git-svn-id: http://svn.miranda-ng.org/main/trunk@15959 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/src/msn_commands.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'protocols/MSN') diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index 05eff0aec3..6e8e3e297e 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -98,7 +98,7 @@ void CMsnProto::MSN_SetMirVer(MCONTACT hContact, MsnPlace *place) char szVersion[64]; - if (!place) return; + if (!place || !place->client) return; mir_snprintf(szVersion, sizeof(szVersion), "%s (%s)", MirVerStr[place->client>=sizeof(MirVerStr)/sizeof(MirVerStr[0])?9:place->client-1], place->szClientVer); setString(hContact, "MirVer", szVersion); @@ -657,8 +657,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u cont->cap2 = end && *end == ':' ? strtoul(end + 1, NULL, 10) : 0; } - if (lastStatus == ID_STATUS_OFFLINE) - MSN_SetMirVer(hContact, cont->places.find((MsnPlace*)&szInst)); + MSN_SetMirVer(hContact, cont->places.find((MsnPlace*)&szInst)); char *pszUrl, *pszAvatarHash; if (cmdstring && *cmdstring && mir_strcmp(cmdstring, "0") && -- cgit v1.2.3