You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
665 B
22 lines
665 B
Fix build with GCC 6 due to lifetime issues.
|
|
|
|
--- a/googletest/src/gtest.cc
|
|
+++ b/googletest/src/gtest.cc
|
|
@@ -2654,10 +2654,12 @@
|
|
test->Run();
|
|
}
|
|
|
|
- // Deletes the test object.
|
|
- impl->os_stack_trace_getter()->UponLeavingGTest();
|
|
- internal::HandleExceptionsInMethodIfSupported(
|
|
- test, &Test::DeleteSelf_, "the test fixture's destructor");
|
|
+ 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);
|
|
|