Merge pull request #7945 from fr500/master

[discord] early return if avatar isn't set
This commit is contained in:
Twinaphex 2019-01-09 11:49:09 +01:00 committed by GitHub
commit f500cf19ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,9 @@ static bool discord_download_avatar(
if(filestream_exists(full_path))
return true;
if (string_is_empty(avatar_id))
return false;
snprintf(url, sizeof(url), "%s/%s/%s.png", cdn_url, user_id, avatar_id);
net_http_urlencode_full(url_encoded, url, sizeof(url_encoded));
snprintf(buf, sizeof(buf), "%s.png", avatar_id);