fix potential crashes by checking nullptr

This commit is contained in:
Daniel Larimer 2013-09-01 19:45:15 -04:00
parent b615522217
commit 9066e46b1b

View file

@ -195,7 +195,7 @@ namespace fc {
/// @pre valid()
bool error()const { return m_prom->error(); }
void cancel()const { m_prom->cancel(); }
void cancel()const { if( m_prom ) m_prom->cancel(); }
bool canceled()const { return m_prom->canceled(); }
/**
@ -244,7 +244,7 @@ namespace fc {
/// @pre valid()
bool error()const { return m_prom->error(); }
void cancel()const { m_prom->cancel(); }
void cancel()const { if( m_prom ) m_prom->cancel(); }
template<typename CompletionHandler>
void on_complete( CompletionHandler&& c ) {