Fixed dereferenced null issue

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

View file

@ -19,14 +19,14 @@ namespace Catch {
std::string const& name,
std::string const& description )
: m_info( name, description, lineInfo ),
m_sectionIncluded( getCurrentContext().getResultCapture().sectionStarted( m_info, m_assertions ) )
m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) )
{
m_timer.start();
}
Section::~Section() {
if( m_sectionIncluded )
getCurrentContext().getResultCapture().sectionEnded( m_info, m_assertions, m_timer.getElapsedSeconds() );
getResultCapture().sectionEnded( m_info, m_assertions, m_timer.getElapsedSeconds() );
}
// This indicates whether the section should be executed or not