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:
@@ -744,6 +744,12 @@ void TwitchChannel::refreshCheerEmotes()
|
||||
NetworkRequest::twitchRequest(url)
|
||||
.onSuccess([this,
|
||||
weak = weakOf<Channel>(this)](auto result) -> Outcome {
|
||||
auto shared = weak.lock();
|
||||
if (!shared)
|
||||
{
|
||||
return Failure;
|
||||
}
|
||||
|
||||
auto cheerEmoteSets = ParseCheermoteSets(result.parseRapidJson());
|
||||
std::vector<CheerEmoteSet> emoteSets;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user