Skip to content

Commit feb93c4

Browse files
committed
src: guard against nullptr deref in TimerWrapHandle::Stop
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]>
1 parent 3f455cb commit feb93c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/timer_wrap.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ TimerWrapHandle::TimerWrapHandle(
5656
}
5757

5858
void TimerWrapHandle::Stop() {
59-
return timer_->Stop();
59+
if (timer_ != nullptr)
60+
return timer_->Stop();
6061
}
6162

6263
void TimerWrapHandle::Close() {

0 commit comments

Comments
 (0)