ENH: fix crash for old style scripts
This commit is contained in:
parent
5d5fd641c3
commit
5690cafd62
|
@ -1317,8 +1317,14 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
|
||||||
{
|
{
|
||||||
cmCTestScriptHandler* ch =
|
cmCTestScriptHandler* ch =
|
||||||
static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
|
static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
|
||||||
const char* subproject =
|
cmake* cm = ch->GetCMake();
|
||||||
ch->GetCMake()->GetProperty("SubProject", cmProperty::GLOBAL);
|
// if no CMake then this is the old style script and props like
|
||||||
|
// this will not work anyway.
|
||||||
|
if(!cm)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const char* subproject = cm->GetProperty("SubProject", cmProperty::GLOBAL);
|
||||||
if(subproject)
|
if(subproject)
|
||||||
{
|
{
|
||||||
ostr << "<Subproject name=\"" << subproject << "\">\n";
|
ostr << "<Subproject name=\"" << subproject << "\">\n";
|
||||||
|
|
Loading…
Reference in New Issue