[Toast] Skip during unit tests

This commit is contained in:
momo5502 2017-03-30 20:49:22 +02:00
parent 36beb29f55
commit 0580e59d11

View File

@ -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.