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:
parent
0fafdb7eb8
commit
1e2c7a7bb3
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue