mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-16 18:15:42 +02:00
Fixed dereferenced null issue
This commit is contained in:
@@ -25,7 +25,10 @@
|
||||
namespace Catch {
|
||||
|
||||
inline IResultCapture& getResultCapture() {
|
||||
return getCurrentContext().getResultCapture();
|
||||
if( IResultCapture* capture = getCurrentContext().getResultCapture() )
|
||||
return *capture;
|
||||
else
|
||||
throw std::logic_error( "No result capture instance" );
|
||||
}
|
||||
|
||||
template<typename MatcherT>
|
||||
|
Reference in New Issue
Block a user