forked from MoonsideGames/MoonWorks
do not destroy untracked resource
parent
d6606d90f6
commit
c34f74a99d
|
@ -27,10 +27,9 @@ namespace MoonWorks.Graphics
|
||||||
{
|
{
|
||||||
if (!IsDisposed)
|
if (!IsDisposed)
|
||||||
{
|
{
|
||||||
Device.PrepareDestroyResource(this, QueueDestroyFunction);
|
|
||||||
|
|
||||||
if (selfReference != null)
|
if (selfReference != null)
|
||||||
{
|
{
|
||||||
|
Device.PrepareDestroyResource(this, QueueDestroyFunction);
|
||||||
Device.RemoveResourceReference(selfReference);
|
Device.RemoveResourceReference(selfReference);
|
||||||
selfReference = null;
|
selfReference = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue