From 7041cd6a884d96941af0ac7aad442a83618aff71 Mon Sep 17 00:00:00 2001 From: David Cole Date: Fri, 14 Oct 2011 07:46:01 -0400 Subject: CTest: Fix crash when variables are not defined Avoiding dereference of NULL pointers is always good. --- Source/CTest/cmCTestConfigureCommand.cxx | 4 ++-- 1 file 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() ) -- cgit v0.12