diff options
author | Rolf Eike Beer <eb@emlix.com> | 2017-09-19 09:55:53 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2017-09-19 15:37:29 (GMT) |
commit | 6db63012057a82b3528ede3f259684f3429731d5 (patch) | |
tree | c24cc355885fe07258091cfb381f26d547334451 /Source/CTest/cmCTestCoverageHandler.cxx | |
parent | d44202ef05a1138bc71109def94c44aae18daf02 (diff) | |
download | CMake-6db63012057a82b3528ede3f259684f3429731d5.zip CMake-6db63012057a82b3528ede3f259684f3429731d5.tar.gz CMake-6db63012057a82b3528ede3f259684f3429731d5.tar.bz2 |
CTest: fix crash if source file for coverage cannot be found
The opened XML elements were not closed, so an assert was triggered when the
file was finally closed. If CMake is built with assertions disabled then an
invalid XML file will be produced.
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 877cd24..28fae1c 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -570,6 +570,8 @@ int cmCTestCoverageHandler::ProcessHandler() ostr << "Cannot open source file: " << fullPath; errorsWhileAccumulating.push_back(ostr.str()); error++; + covLogXML.EndElement(); // Report + covLogXML.EndElement(); // File continue; } int untested = 0; |