mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 22:10:32 +00:00
CTest: Fix crash when variables are not defined
Avoiding dereference of NULL pointers is always good.
This commit is contained in:
parent
731d61d8d9
commit
7041cd6a88
@ -41,7 +41,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
{
|
||||
this->CTest->SetCTestConfiguration("BuildDirectory",
|
||||
cmSystemTools::CollapseFullPath(
|
||||
this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str());
|
||||
this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY")).c_str());
|
||||
}
|
||||
|
||||
if ( this->Values[ct_SOURCE] )
|
||||
@ -54,7 +54,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
{
|
||||
this->CTest->SetCTestConfiguration("SourceDirectory",
|
||||
cmSystemTools::CollapseFullPath(
|
||||
this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
|
||||
this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
|
||||
}
|
||||
|
||||
if ( this->CTest->GetCTestConfiguration("BuildDirectory").empty() )
|
||||
|
Loading…
Reference in New Issue
Block a user