diff --git a/Gorgon/Gorgon.Graphics.Core/Textures/GorgonTextureCache.cs b/Gorgon/Gorgon.Graphics.Core/Textures/GorgonTextureCache.cs index 3e7437e99..bc2f9a200 100644 --- a/Gorgon/Gorgon.Graphics.Core/Textures/GorgonTextureCache.cs +++ b/Gorgon/Gorgon.Graphics.Core/Textures/GorgonTextureCache.cs @@ -286,7 +286,7 @@ bool GetTextureFromCache(out T texture, out Lazy entry) _graphics.Log.Print($"Requested texture '{textureName}' is currently being loaded on another thread, waiting for it to become available.", LoggingLevel.Verbose); // If we're requesting a texture that's in the process of loading, then wait until the previous guy is done. - await Task.Run(() => SpinWait.SpinUntil(() => (!_scheduledTextures.Contains(textureName)) || (GetTextureFromCache(out _, out _)))); + await Task.Run(() => SpinWait.SpinUntil(() => (!_scheduledTextures.Contains(textureName)) || (GetTextureFromCache(out result, out _)))); } if ((result != null) || ((GetTextureFromCache(out result, out Lazy entry)) && (result != null)))