UnitTests: Fix double deletion

Change-Id: Id28f739a3f6b0c200386edf67914886ae06e2999
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2020-11-10 15:39:36 +01:00
parent 2a2dfbec73
commit d1d95e78d6

View File

@@ -61,8 +61,8 @@ int main(int argc, char *argv[])
benchmark::Initialize(&argc, argv);
#endif
Environment environment;
testing::AddGlobalTestEnvironment(&environment);
auto environment = std::make_unique<Environment>();
testing::AddGlobalTestEnvironment(environment.release());
int testsHaveErrors = RUN_ALL_TESTS();