From 0580e59d11ff0b27114ba507b7a5d1abe7e45e41 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Thu, 30 Mar 2017 20:49:22 +0200 Subject: [PATCH] [Toast] Skip during unit tests --- src/Components/Modules/Toast.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Toast.cpp b/src/Components/Modules/Toast.cpp index bd55ae68..b2efc50d 100644 --- a/src/Components/Modules/Toast.cpp +++ b/src/Components/Modules/Toast.cpp @@ -146,7 +146,7 @@ namespace Components Toast::Toast() { - if (Dedicated::IsEnabled() || Monitor::IsEnabled()) return; + if (Dedicated::IsEnabled() || Monitor::IsEnabled() || Loader::PerformingUnitTests()) return; Toast::ToastHandler = new WinToastLib::WinToastHandler; @@ -172,7 +172,7 @@ namespace Components void Toast::preDestroy() { - if (Dedicated::IsEnabled() || Monitor::IsEnabled()) return; + if (Dedicated::IsEnabled() || Monitor::IsEnabled() || Loader::PerformingUnitTests()) return; // Destroying that on the main thread deadlocks. // I did not write the library, so whatever.