summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-10-14 11:46:01 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-10-14 11:46:01 (GMT)
commit7041cd6a884d96941af0ac7aad442a83618aff71 (patch)
tree730eec008c9ae81d426267b6e4401376bdeb8906 /Source/CTest
parent731d61d8d9119417e5cc0b10ef167183d137cb00 (diff)
downloadCMake-7041cd6a884d96941af0ac7aad442a83618aff71.zip
CMake-7041cd6a884d96941af0ac7aad442a83618aff71.tar.gz
CMake-7041cd6a884d96941af0ac7aad442a83618aff71.tar.bz2
CTest: Fix crash when variables are not defined
Avoiding dereference of NULL pointers is always good.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index 9a668bc..7a99ddf 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() )