Skip to content

Commit 4d35330

Browse files
committed
src: guard against nullptr deref in TimerWrapHandle::Stop
Refs: nodejs#34454
1 parent 00823f2 commit 4d35330

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/timer_wrap.cc

Lines changed: 2 additions & 1 deletion
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)