make sure that access is completely atomic

This commit is contained in:
goat 2023-09-23 17:45:50 +02:00
parent 8527e035f1
commit acb81deb9c
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -305,12 +305,12 @@ internal class TextureManager : IDisposable, IServiceType, ITextureProvider, ITe
if (info == null)
throw new Exception("null info in activeTextures");
}
info.LastAccess = DateTime.UtcNow;
info.LastAccess = DateTime.UtcNow;
if (info is { Wrap: not null })
return info;
if (info is { Wrap: not null })
return info;
}
if (!this.im.IsReady)
throw new InvalidOperationException("Cannot create textures before scene is ready");