mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Attempt to catch std::bad_function_call
when adding a channel point reward (#4360)
* fix: attempt to catch std::bad_function_call * chore: add changelog entry * fix: spelling mistake Co-authored-by: Leon Richardt <git@leon.dev> --------- Co-authored-by: Leon Richardt <git@leon.dev>
This commit is contained in:
parent
6defee0615
commit
829c48d79a
2 changed files with 16 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
||||||
- Bugfix: Fixed the split "Search" menu action not opening the correct search window. (#4305)
|
- Bugfix: Fixed the split "Search" menu action not opening the correct search window. (#4305)
|
||||||
- Bugfix: Fixed an issue on Windows when opening links in incognito mode that contained forward slashes in hash (#4307)
|
- Bugfix: Fixed an issue on Windows when opening links in incognito mode that contained forward slashes in hash (#4307)
|
||||||
- Bugfix: Fixed an issue where beta versions wouldn't update to stable versions correctly. (#4329)
|
- Bugfix: Fixed an issue where beta versions wouldn't update to stable versions correctly. (#4329)
|
||||||
|
- Bugfix: Avoided crash that could occur when receiving channel point reward information. (#4360)
|
||||||
- Dev: Changed sound backend from Qt to miniaudio. (#4334)
|
- Dev: Changed sound backend from Qt to miniaudio. (#4334)
|
||||||
- Dev: Remove protocol from QApplication's Organization Domain (so changed from `https://www.chatterino.com` to `chatterino.com`). (#4256)
|
- Dev: Remove protocol from QApplication's Organization Domain (so changed from `https://www.chatterino.com` to `chatterino.com`). (#4256)
|
||||||
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
||||||
|
|
|
@ -304,7 +304,21 @@ void TwitchChannel::addChannelPointReward(const ChannelPointReward &reward)
|
||||||
<< "[TwitchChannel" << this->getName()
|
<< "[TwitchChannel" << this->getName()
|
||||||
<< "] Channel point reward added:" << reward.id << ","
|
<< "] Channel point reward added:" << reward.id << ","
|
||||||
<< reward.title << "," << reward.isUserInputRequired;
|
<< reward.title << "," << reward.isUserInputRequired;
|
||||||
this->channelPointRewardAdded.invoke(reward);
|
|
||||||
|
// TODO: There's an underlying bug here. This bug should be fixed.
|
||||||
|
// This only attempts to prevent a crash when invoking the signal.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this->channelPointRewardAdded.invoke(reward);
|
||||||
|
}
|
||||||
|
catch (const std::bad_function_call &)
|
||||||
|
{
|
||||||
|
qCWarning(chatterinoTwitch).nospace()
|
||||||
|
<< "[TwitchChannel " << this->getName()
|
||||||
|
<< "] Caught std::bad_function_call when adding channel point "
|
||||||
|
"reward ChannelPointReward{ id: "
|
||||||
|
<< reward.id << ", title: " << reward.title << " }.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue