From acd587cce58ccc611c45819fa9abdc0b862d3aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 5 Mar 2015 11:41:36 +0000 Subject: Steam: Fix setting wrong contact status when connecting to same account from official Steam client git-svn-id: http://svn.miranda-ng.org/main/trunk@12321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_pooling.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/Steam') diff --git a/protocols/Steam/src/steam_pooling.cpp b/protocols/Steam/src/steam_pooling.cpp index e7b41db3f5..8eaef3baee 100644 --- a/protocols/Steam/src/steam_pooling.cpp +++ b/protocols/Steam/src/steam_pooling.cpp @@ -57,14 +57,14 @@ void CSteamProto::ParsePollData(JSONNODE *data) else if (!lstrcmpi(type, _T("personastate"))) { node = json_get(item, "persona_state"); - int status = SteamToMirandaStatus(json_as_int(node)); + int status = node ? SteamToMirandaStatus(json_as_int(node)) : -1; if (IsMe(steamId)) { node = json_get(item, "persona_name"); setTString("Nick", ptrT(json_as_string(node))); - if (status == ID_STATUS_OFFLINE) + if (status == -1 || status == ID_STATUS_OFFLINE) continue; if (status != m_iStatus) @@ -82,7 +82,8 @@ void CSteamProto::ParsePollData(JSONNODE *data) if (hContact == NULL) continue; // probably this is info about random player playing on same server, so we ignore it - SetContactStatus(hContact, status); + if (status != -1) + SetContactStatus(hContact, status); node = json_get(item, "persona_name"); setTString(hContact, "Nick", ptrT(json_as_string(node))); -- cgit v1.2.3