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:
parent
875c478b64
commit
a86df0251f
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue