Skip to content

Commit

Permalink
src: guard against nullptr deref in TimerWrapHandle::Stop
Browse files Browse the repository at this point in the history
Refs: #34454

PR-URL: #34460
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: David Carlier <[email protected]>
  • Loading branch information
addaleax committed Jul 21, 2020
1 parent 3f455cb commit feb93c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/timer_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ TimerWrapHandle::TimerWrapHandle(
}

void TimerWrapHandle::Stop() {
return timer_->Stop();
if (timer_ != nullptr)
return timer_->Stop();
}

void TimerWrapHandle::Close() {
Expand Down

0 comments on commit feb93c4

Please sign in to comment.