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.
This commit is contained in:
Brad King 2008-12-18 12:27:54 -05:00
parent 0fafdb7eb8
commit 1e2c7a7bb3
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}