From a86df0251fe226664e4cb70cebe7bb272aa7fd81 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 11 Aug 2009 16:25:56 -0400 Subject: Fix failing test on release build for VS 10 cmSystemTools::GetLineFromStream crashes if the stream is not open in that case. --- Source/CTest/cmCTestCVS.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx index 18ec0ec..d58240a 100644 --- a/Source/CTest/cmCTestCVS.cxx +++ b/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. -- cgit v0.12