From c34f74a99d9c132e0dee2a95f54df8ae1464a2ba Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 2 Mar 2022 09:58:32 -0800 Subject: [PATCH] do not destroy untracked resource --- src/Graphics/GraphicsResource.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Graphics/GraphicsResource.cs b/src/Graphics/GraphicsResource.cs index f60b19e8..b1f73231 100644 --- a/src/Graphics/GraphicsResource.cs +++ b/src/Graphics/GraphicsResource.cs @@ -27,10 +27,9 @@ namespace MoonWorks.Graphics { if (!IsDisposed) { - Device.PrepareDestroyResource(this, QueueDestroyFunction); - if (selfReference != null) { + Device.PrepareDestroyResource(this, QueueDestroyFunction); Device.RemoveResourceReference(selfReference); selfReference = null; }