summaryrefslogtreecommitdiff
path: root/protocols/Steam/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-09-11 17:21:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-09-11 17:21:39 +0300
commitc45fb2f2debca153f2008c4bd6789a25eaabfe60 (patch)
treed720298a52c25e3a38ac15cbd427f69f7d0b4860 /protocols/Steam/src
parent00a8a79cf2104a6faa07d486fcdd572144cd23fe (diff)
Steam: if a friend list request comes with error code, all contacts are removed from Miranda
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r--protocols/Steam/src/steam_contacts.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index a52d2ed3a7..2f20ba9378 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -395,6 +395,11 @@ void CSteamProto::OnGotFriendList(const JSONNode &root, void *)
json_string steamId = _friend["steamid"].as_string();
friendsMap.insert(std::make_pair(steamId, &_friend));
}
+
+ if (friendsMap.empty()) {
+ debugLogA("Empty friends list, exiting");
+ return;
+ }
// Check and update contacts in database
for (auto &hContact : AccContacts()) {