Skip to content

Commit 4379583

Browse files
committed
fix: only reset timer persistent if Isolate is valid
1 parent 6970c92 commit 4379583

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

NativeScript/runtime/Timers.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class TimerTask {
3636
}
3737

3838
inline void Unschedule() {
39-
callback_.Reset();
39+
if (wrapper.IsValid()) {
40+
callback_.Reset();
41+
}
4042
args_.reset();
4143
isolate_ = nullptr;
4244
queued_ = false;

0 commit comments

Comments
 (0)