From 4d87db34d75f97c8230bc25c15e0f204c46114b6 Mon Sep 17 00:00:00 2001 From: Alex P <13677108+itzAlex@users.noreply.github.com> Date: Wed, 4 May 2022 08:50:22 +0200 Subject: [PATCH] Fixed crash related with 7TV animated pfp (#87) --- src/widgets/dialogs/UserInfoPopup.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index 9c3dbb10960..5776b746773 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -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) @@ -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; })