Commit 1e2c7a7b authored by Brad King's avatar Brad King 💬
Browse files

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.
parent 0fafdb7e
......@@ -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();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment