Prevent Generation of Crashdumps When the Browser Is Closed (#4667)

* fix: extension process generating crashdumps

* fix: move `getApp` call

* chore: remove distracting comments

* chore: add changelog entry
This commit is contained in:
nerix 2023-06-04 14:21:16 +02:00 committed by GitHub
parent 6681ed5bfb
commit f306e288b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -6,6 +6,7 @@
- Minor: Add an icon showing when streamer mode is enabled (#4410)
- Minor: Added `/shoutout <username>` commands to shoutout specified user. (#4638)
- Minor: Improved editing hotkeys. (#4628)
- Bugfix: Fixed generation of crashdumps by the browser-extension process when the browser was closed. (#4667)
- Dev: Added command to set Qt's logging filter/rules at runtime (`/c2-set-logging-rules`). (#4637)
- Dev: Added the ability to see & load custom themes from the Themes directory. No stable promises are made of this feature, changes might be made that breaks custom themes without notice. (#4570)
- Dev: Added test cases for emote and tab completion. (#4644)

View file

@ -75,6 +75,7 @@ namespace {
client.sendMessage(data);
}
_Exit(0);
}
} // namespace

View file

@ -189,7 +189,6 @@ void NativeMessagingServer::ReceiverThread::run()
void NativeMessagingServer::ReceiverThread::handleMessage(
const QJsonObject &root)
{
auto app = getApp();
QString action = root.value("action").toString();
if (action.isNull())
@ -237,6 +236,8 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
if (_type == "twitch")
{
postToThread([=] {
auto *app = getApp();
if (!name.isEmpty())
{
auto channel = app->twitch->getOrAddChannel(name);
@ -249,15 +250,12 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
if (attach || attachFullscreen)
{
#ifdef USEWINSDK
// if (args.height != -1) {
auto *window =
AttachedWindow::get(::GetForegroundWindow(), args);
if (!name.isEmpty())
{
window->setChannel(app->twitch->getOrAddChannel(name));
}
// }
// window->show();
#endif
}
});