Fix bug with removing a removed texture reference

This commit is contained in:
Flamefire committed 2014-09-25 16:22:49 +02:00
1 parent f0b227798e
commit a06e5066e9
1 file changed
+3
+3
View File
@@ -882,6 +882,8 @@ namespace Vocaluxe.Lib.Draw
{ {
if (textureRef == null) if (textureRef == null)
return; return;
if (textureRef.ID > 0)
{
if (_MainThreadID != Thread.CurrentThread.ManagedThreadId) if (_MainThreadID != Thread.CurrentThread.ManagedThreadId)
{ {
lock (_TextureQueue) lock (_TextureQueue)
@@ -901,6 +903,7 @@ namespace Vocaluxe.Lib.Draw
} }
textureRef.SetRemoved(); textureRef.SetRemoved();
} }
}
textureRef = null; textureRef = null;
} }