mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Added null-ptr check in Colour::use()
This commit is contained in:
		| @@ -222,7 +222,13 @@ namespace Catch { | ||||
|  | ||||
|     void Colour::use( Code _colourCode ) { | ||||
|         static IColourImpl* impl = platformColourInstance(); | ||||
|         impl->use( _colourCode ); | ||||
|         // Strictly speaking, this cannot possibly happen. | ||||
|         // However, under some conditions it does happen (see #1626), | ||||
|         // and this change is small enough that we can let practicality | ||||
|         // triumph over purity in this case. | ||||
|         if (impl != NULL) { | ||||
|             impl->use( _colourCode ); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     std::ostream& operator << ( std::ostream& os, Colour const& ) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 geh
					geh