From 35cd411ca3d7f957bdd8c47155b30720d643b927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Tue, 28 May 2024 08:54:38 +0200 Subject: [PATCH] fix(UI): Fix unhandled error when playing VR (#6679) --- ui/vr_webgl.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/vr_webgl.js b/ui/vr_webgl.js index 7021f247a1..0babfdfe34 100644 --- a/ui/vr_webgl.js +++ b/ui/vr_webgl.js @@ -245,7 +245,9 @@ shaka.ui.VRWebgl = class { }).tickNow().tickEvery(1 / frameRate); }); this.eventManager_.listen(this.video_, 'pause', () => { - this.activeTimer_.stop(); + if (this.activeTimer_) { + this.activeTimer_.stop(); + } this.activeTimer_ = null; this.renderGL_(); });