add try/catch
This commit is contained in:
@ -133,7 +133,7 @@ class Screen
|
||||
const canvas = this.canvasVideo;
|
||||
const video = canvas.video;
|
||||
const texture = this.screen.material.map;
|
||||
|
||||
try {
|
||||
if (video)
|
||||
{
|
||||
video.pause();
|
||||
@ -141,6 +141,9 @@ class Screen
|
||||
video.removeAttribute('src');
|
||||
video.load();
|
||||
}
|
||||
catch {
|
||||
// Do nothing
|
||||
}
|
||||
if (texture)
|
||||
texture.dispose();
|
||||
canvas.video = null;
|
||||
|
Reference in New Issue
Block a user