do not destroy untracked resource

main
cosmonaut 2022-03-02 09:58:32 -08:00
parent d6606d90f6
commit c34f74a99d
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}