From e680c4b9fb1d699bfad239e42ce7643d7cf00371 Mon Sep 17 00:00:00 2001 From: Jozef Grajciar Date: Wed, 15 May 2019 20:14:25 +0200 Subject: [PATCH] fix SEGFAULT during construction of Session coloured output tried to write startup exceptions to stream which was not initialized --- include/internal/catch_session.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp index 38b74ef729..5aee5d9979 100644 --- a/include/internal/catch_session.cpp +++ b/include/internal/catch_session.cpp @@ -134,6 +134,9 @@ namespace Catch { #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions(); if ( !exceptions.empty() ) { + config(); + getCurrentMutableContext().setConfig(m_config); + m_startupExceptions = true; Colour colourGuard( Colour::Red ); Catch::cerr() << "Errors occurred during startup!" << '\n';