fix SEGFAULT during construction of Session

coloured output tried to write startup exceptions
to stream which was not initialized
This commit is contained in:
Jozef Grajciar 2019-05-15 20:14:25 +02:00
parent f1e14a1168
commit e680c4b9fb
1 changed files with 3 additions and 0 deletions

View File

@ -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';