fix: deadlock and use-after-free in tests (#4981)
* fix: use-after-free in settings * refactor: put seventv api into a singleton * chore: add changelog entry * Add warning for when the 7TV load fails
This commit is contained in:
@@ -491,7 +491,15 @@ void TwitchAccount::loadSeventvUserID()
|
||||
return;
|
||||
}
|
||||
|
||||
getSeventvAPI().getUserByTwitchID(
|
||||
auto *seventv = getIApp()->getSeventvAPI();
|
||||
if (!seventv)
|
||||
{
|
||||
qCWarning(chatterinoSeventv)
|
||||
<< "Not loading 7TV User ID because the 7TV API is not initialized";
|
||||
return;
|
||||
}
|
||||
|
||||
seventv->getUserByTwitchID(
|
||||
this->getUserId(),
|
||||
[this](const auto &json) {
|
||||
const auto id = json["user"]["id"].toString();
|
||||
|
||||
Reference in New Issue
Block a user