diff --git a/src/catch2/reporters/catch_reporter_combined_tu.cpp b/src/catch2/reporters/catch_reporter_combined_tu.cpp index 0625943310..2d6e112c2b 100644 --- a/src/catch2/reporters/catch_reporter_combined_tu.cpp +++ b/src/catch2/reporters/catch_reporter_combined_tu.cpp @@ -154,6 +154,12 @@ namespace Catch { void defaultListListeners( std::ostream& out, std::vector const& descriptions ) { + out << "Registered listeners:\n"; + + if(descriptions.empty()) { + return; + } + const auto maxNameLen = std::max_element( descriptions.begin(), descriptions.end(), @@ -163,7 +169,6 @@ namespace Catch { } ) ->name.size(); - out << "Registered listeners:\n"; for ( auto const& desc : descriptions ) { out << TextFlow::Column( static_cast( desc.name ) + ':' )