diff options
author | David Cole <david.cole@kitware.com> | 2011-10-14 07:46:01 -0400 |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-10-14 07:46:01 -0400 |
commit | 7041cd6a884d96941af0ac7aad442a83618aff71 (patch) | |
tree | 730eec008c9ae81d426267b6e4401376bdeb8906 /Source/CTest/cmCTestConfigureCommand.cxx | |
parent | 731d61d8d9119417e5cc0b10ef167183d137cb00 (diff) | |
download | cmake-7041cd6a884d96941af0ac7aad442a83618aff71.tar.gz |
CTest: Fix crash when variables are not defined
Avoiding dereference of NULL pointers is always good.
Diffstat (limited to 'Source/CTest/cmCTestConfigureCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestConfigureCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index 9a668bce1e..7a99ddfa0b 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -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() ) |