mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	fix SEGFAULT during construction of Session
coloured output tried to write startup exceptions to stream which was not initialized
This commit is contained in:
		| @@ -134,6 +134,9 @@ namespace Catch { | |||||||
| #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) | #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) | ||||||
|         const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions(); |         const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions(); | ||||||
|         if ( !exceptions.empty() ) { |         if ( !exceptions.empty() ) { | ||||||
|  |             config(); | ||||||
|  |             getCurrentMutableContext().setConfig(m_config); | ||||||
|  |  | ||||||
|             m_startupExceptions = true; |             m_startupExceptions = true; | ||||||
|             Colour colourGuard( Colour::Red ); |             Colour colourGuard( Colour::Red ); | ||||||
|             Catch::cerr() << "Errors occurred during startup!" << '\n'; |             Catch::cerr() << "Errors occurred during startup!" << '\n'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jozef Grajciar
					Jozef Grajciar