Browse Source

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

Bill Hoffman 16 years ago
parent
commit
a86df0251f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/CTest/cmCTestCVS.cxx

+ 1 - 1
Source/CTest/cmCTestCVS.cxx

@@ -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.