blob: 8dfed46d458502d5a453b0f8d46997bc14e1f1d2 [file] [log] [blame]
Fix build with GCC 6 due to lifetime issues.
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -2693,10 +2693,12 @@
test->Run();
}
+ if (test != NULL) {
// Deletes the test object.
impl->os_stack_trace_getter()->UponLeavingGTest();
internal::HandleExceptionsInMethodIfSupported(
test, &Test::DeleteSelf_, "the test fixture's destructor");
+ }
result_.set_elapsed_time(internal::GetTimeInMillis() - start);