fix potential crashes by checking nullptr
This commit is contained in:
parent
b615522217
commit
9066e46b1b
1 changed files with 2 additions and 2 deletions
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue