From fabd9def6864aa461055e10002a7fc45c5ce85d7 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 28 Mar 2007 11:07:36 -0400 Subject: [PATCH] BUG: even safer checking of return value --- Source/CTest/cmCTestBuildHandler.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 52945bbd0..1240cbfee 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -713,14 +713,15 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, this->TotalWarnings ++; } } - else if(result == cmsysProcess_State_Exception) + } + else if(result == cmsysProcess_State_Exception) + { + if (retVal) { - if (retVal) - { - *retVal = cmsysProcess_GetExitException(cp); - cmCTestLog(this->CTest, WARNING, "There was an exception: " << *retVal - << std::endl); - } + *retVal = cmsysProcess_GetExitException(cp); + cmCTestLog(this->CTest, WARNING, "There was an exception: " << *retVal + << std::endl); + } } else if(result == cmsysProcess_State_Expired) {