Merge pull request #12950 from AdmiralCurtiss/achievement-fix-badge-network-error

AchievementManager: Fix incorrect check on network request return value in FetchBadge()
This commit is contained in:
Tilka 2024-07-23 20:16:54 +01:00 committed by GitHub
commit 5f4f974b48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1175,7 +1175,7 @@ void AchievementManager::FetchBadge(AchievementManager::Badge* badge, u32 badge_
}
auto http_response = http_request.Get(api_request.url, USER_AGENT_HEADER,
Common::HttpRequest::AllowedReturnCodes::All);
if (http_response.has_value() && http_response->size() <= 0)
if (!http_response.has_value() || http_response->empty())
{
WARN_LOG_FMT(ACHIEVEMENTS,
"RetroAchievements connection failed on image request.\n URL: {}",