Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorJozef Grajciar2019-05-15 20:14:25 +0200
committerJozef Grajciar2019-05-15 20:14:25 +0200
commite680c4b9fb1d699bfad239e42ce7643d7cf00371 (patch)
tree26c9d15a366013a2fe2fe280c7fb7d3978572607 /include
parentf1e14a1168fc31718362e34d075cb0e3298dc671 (diff)
downloadcatch3-e680c4b9fb1d699bfad239e42ce7643d7cf00371.tar.gz
fix SEGFAULT during construction of Session
coloured output tried to write startup exceptions to stream which was not initialized
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_session.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp
index 38b74ef7..5aee5d99 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';