blob: d062baca40c8c0965877f340aac532d02a40ae54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 96b07c6..4af3e5a 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -2693,10 +2693,12 @@ void TestInfo::Run() {
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);
|