[Loader] Disable com environment during unit tests

This commit is contained in:
momo5502 2017-03-10 19:56:26 +01:00
parent a541e26950
commit 1843522b16

View File

@ -23,7 +23,7 @@ namespace Components
Loader::Postgame = false; Loader::Postgame = false;
Loader::MemAllocator.clear(); Loader::MemAllocator.clear();
CoInitialize(nullptr); if(!Loader::PerformingUnitTests()) CoInitialize(nullptr);
Loader::Register(new Flags()); Loader::Register(new Flags());
Loader::Register(new Singleton()); Loader::Register(new Singleton());
@ -117,7 +117,7 @@ namespace Components
Loader::Components.clear(); Loader::Components.clear();
Loader::MemAllocator.clear(); Loader::MemAllocator.clear();
CoUninitialize(); if (!Loader::PerformingUnitTests()) CoUninitialize();
} }
void Loader::PreDestroy() void Loader::PreDestroy()