mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix a crash in TwitchChannel::refreshCheerEmotes
If you closed down the split right after the refreshCheerEmotes call was made, then refreshCheerEmotes used this after it was free'd
This commit is contained in:
parent
265bab1ce6
commit
81b79e14b5
1 changed files with 6 additions and 0 deletions
|
@ -744,6 +744,12 @@ void TwitchChannel::refreshCheerEmotes()
|
||||||
NetworkRequest::twitchRequest(url)
|
NetworkRequest::twitchRequest(url)
|
||||||
.onSuccess([this,
|
.onSuccess([this,
|
||||||
weak = weakOf<Channel>(this)](auto result) -> Outcome {
|
weak = weakOf<Channel>(this)](auto result) -> Outcome {
|
||||||
|
auto shared = weak.lock();
|
||||||
|
if (!shared)
|
||||||
|
{
|
||||||
|
return Failure;
|
||||||
|
}
|
||||||
|
|
||||||
auto cheerEmoteSets = ParseCheermoteSets(result.parseRapidJson());
|
auto cheerEmoteSets = ParseCheermoteSets(result.parseRapidJson());
|
||||||
std::vector<CheerEmoteSet> emoteSets;
|
std::vector<CheerEmoteSet> emoteSets;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue