summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index e0d7c84..61bd6fa 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -833,8 +833,9 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length,
{
// This is not an error or warning.
// So, figure out if this is a post-context line
- if ( this->LastErrorOrWarning != this->ErrorsAndWarnings.end() &&
- this->PostContextCount < this->MaxPostContext )
+ if ( this->ErrorsAndWarnings.size() &&
+ this->LastErrorOrWarning != this->ErrorsAndWarnings.end() &&
+ this->PostContextCount < this->MaxPostContext )
{
this->PostContextCount ++;
this->LastErrorOrWarning->PostContext += line;