BUG: even safer checking of return value

This commit is contained in:
Ken Martin 2007-03-28 11:07:36 -04:00
parent f0857fcbd3
commit fabd9def68
1 changed files with 8 additions and 7 deletions

View File

@ -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)
{