From d2d633a1667ea16c9c88eae9d679c91c545a77ee Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Feb 2017 20:11:44 +0300 Subject: fix for null avatar hash processing --- protocols/Discord/src/utils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index a9b95b6f49..daddcc46ff 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -197,7 +197,10 @@ CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) pUser->hContact = hContact; } - setWString(pUser->hContact, DB_KEY_AVHASH, avatar); + if (avatar.IsEmpty()) + delSetting(pUser->hContact, DB_KEY_AVHASH); + else + setWString(pUser->hContact, DB_KEY_AVHASH, avatar); return pUser; } -- cgit v1.2.3