From 95baaf3a9156bb01bc8d28cd54e21bed7aac3e7e Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 15 Dec 2023 10:02:40 -0800 Subject: [PATCH] only dispose video textures if they have been created --- src/Video/VideoPlayer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Video/VideoPlayer.cs b/src/Video/VideoPlayer.cs index efc2814..f2d079a 100644 --- a/src/Video/VideoPlayer.cs +++ b/src/Video/VideoPlayer.cs @@ -318,10 +318,10 @@ namespace MoonWorks.Video { Unload(); - RenderTexture.Dispose(); - yTexture.Dispose(); - uTexture.Dispose(); - vTexture.Dispose(); + RenderTexture?.Dispose(); + yTexture?.Dispose(); + uTexture?.Dispose(); + vTexture?.Dispose(); } } base.Dispose(disposing);