From dcfb194648dddf38688278a3669f7798d1d3e1cf Mon Sep 17 00:00:00 2001 From: nerix Date: Mon, 2 Dec 2024 16:57:56 +0100 Subject: [PATCH] fix(toasts): only clear if initialized (#5752) --- CHANGELOG.md | 2 +- src/singletons/Toasts.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c4d6c0f..cf4906a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,7 +74,7 @@ - Bugfix: Fixed incorrect message being disabled in some cases upon approving or denying an automod caught message. (#5611) - Bugfix: Fixed network requests timing out despite them not being in flight for that long, for Qt 6.3+ where we have the technology. (#5729) - Bugfix: Fixed double-click selection not working when clicking outside a message. (#5617) -- Bugfix: Fixed a potential rare crash that could occur on Windows if a toast was about to fire just as we were shutting down. (#5728) +- Bugfix: Fixed a rare crash that could occur on Windows if a toast was about to fire just as we were shutting down. (#5728, #5752) - Bugfix: Fixed emotes starting with ":" not tab-completing. (#5603) - Bugfix: Fixed 7TV emotes messing with Qt's HTML. (#5677) - Bugfix: Fixed incorrect messages getting replaced visually. (#5683) diff --git a/src/singletons/Toasts.cpp b/src/singletons/Toasts.cpp index efcb908b..3e8f804d 100644 --- a/src/singletons/Toasts.cpp +++ b/src/singletons/Toasts.cpp @@ -73,7 +73,10 @@ using WinToastLib::WinToastTemplate; Toasts::~Toasts() { #ifdef Q_OS_WIN - WinToast::instance()->clear(); + if (this->initialized_) + { + WinToast::instance()->clear(); + } #endif }