Fixed dereferenced null issue

This commit is contained in:
Phil Nash committed 2014-05-20 18:49:28 +01:00
1 parent 59d556907d
commit 5daa22dcc3
5 files changed
+16 -19

No files matched your search

+4 -1
View File
@@ -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>