diff options
author | Brad King <brad.king@kitware.com> | 2008-12-18 17:27:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-12-18 17:27:54 (GMT) |
commit | 1e2c7a7bb387393a6101372764bb9d5fb1c104d4 (patch) | |
tree | 3baf9d73d26381578862f23bc7d80bcadcc406a7 /Source/cmCTest.cxx | |
parent | 0fafdb7eb8b710594448d2ccf61d3896b4ea8a17 (diff) | |
download | CMake-1e2c7a7bb387393a6101372764bb9d5fb1c104d4.zip CMake-1e2c7a7bb387393a6101372764bb9d5fb1c104d4.tar.gz CMake-1e2c7a7bb387393a6101372764bb9d5fb1c104d4.tar.bz2 |
BUG: Fix crash when running internal CTest
When CTest encounters a test whose executable is the ctest executable
iteslf, it just invokes code inside itself to avoid starting a new
process. This fixes a null-pointer dereference in the logging code of
that case.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 629282b..78b11cf 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1154,7 +1154,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, args.push_back(argv[i]); } } - if ( *log ) + if ( log ) { *log << "* Run internal CTest" << std::endl; } @@ -1166,7 +1166,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, } *retVal = inst.Run(args, output); - if ( *log ) + if ( log ) { *log << output->c_str(); } |