Skip to content

Commit

Permalink
Fixed crash related with 7TV animated pfp (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzAlex authored May 4, 2022
1 parent 69a8f0a commit 4d87db3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/widgets/dialogs/UserInfoPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,6 @@ void UserInfoPopup::fetchSevenTVAvatar(const HelixUser &user)
if (profile_picture_id.length() > 0)
{
auto URI = SEVENTV_CDR_PP.arg(id, profile_picture_id);
this->avatarUrl_ = URI;

NetworkRequest(URI)
.timeout(20000)
Expand All @@ -1007,7 +1006,12 @@ void UserInfoPopup::fetchSevenTVAvatar(const HelixUser &user)
this->getFilename(hash.result().toHex());

this->saveCacheAvatar(data, filename);
this->setSevenTVAvatar(filename);

if (this->ui_.avatarButton != nullptr)
{
this->avatarUrl_ = URI;
this->setSevenTVAvatar(filename);
}

return Success;
})
Expand Down

0 comments on commit 4d87db3

Please sign in to comment.