Fix failing test on release build for VS 10 cmSystemTools::GetLineFromStream crashes if the stream is not open in that case.

This commit is contained in:
Bill Hoffman 2009-08-11 16:25:56 -04:00
parent 875c478b64
commit a86df0251f
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ std::string cmCTestCVS::ComputeBranchFlag(std::string const& dir)
// Lookup the branch in the tag file, if any.
std::string tagLine;
std::ifstream tagStream(tagFile.c_str());
if(cmSystemTools::GetLineFromStream(tagStream, tagLine) &&
if(tagStream && cmSystemTools::GetLineFromStream(tagStream, tagLine) &&
tagLine.size() > 1 && tagLine[0] == 'T')
{
// Use the branch specified in the tag file.