diff options
author | Gennadiy Civil <misterg@google.com> | 2019-02-13 22:04:08 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-02-13 22:04:09 (GMT) |
commit | d850e144710e330070b756c009749dc7a7302301 (patch) | |
tree | 1c0372bcda065b6cc74b516b1073ea38a02cfeac /googletest/src/gtest.cc | |
parent | 54ec41f000189e89c5cfa8b115c6512cfdc0a21b (diff) | |
parent | 48e6f1f387e6e67489d7b1422239c1be637006cb (diff) | |
download | googletest-d850e144710e330070b756c009749dc7a7302301.zip googletest-d850e144710e330070b756c009749dc7a7302301.tar.gz googletest-d850e144710e330070b756c009749dc7a7302301.tar.bz2 |
Merge pull request #2112 from knuto:pr/fix_null_pointer
PiperOrigin-RevId: 233825166
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r-- | googletest/src/gtest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index d1cfb53..1d41692 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -2675,10 +2675,12 @@ void TestInfo::Run() { test->Run(); } + if (test != nullptr) { // 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); |