Skip to content

Commit

Permalink
src: guard against nullptr deref in TimerWrapHandle::Stop
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Jul 21, 2020
1 parent 00823f2 commit 4d35330
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/timer_wrap.cc
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 4d35330

Please sign in to comment.