Fix verbose log in TextureManager.Dispose (#1596)

This commit is contained in:
Haselnussbomber 2024-01-05 20:32:14 +01:00 committed by GitHub
parent de53150bd3
commit 653dca2feb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Numerics; using System.Numerics;
@ -273,7 +273,10 @@ internal class TextureManager : IDisposable, IServiceType, ITextureProvider, ITe
this.fallbackTextureWrap?.Dispose(); this.fallbackTextureWrap?.Dispose();
this.framework.Update -= this.FrameworkOnUpdate; this.framework.Update -= this.FrameworkOnUpdate;
Log.Verbose("Disposing {Num} left behind textures."); if (this.activeTextures.Count == 0)
return;
Log.Verbose("Disposing {Num} left behind textures.", this.activeTextures.Count);
foreach (var activeTexture in this.activeTextures) foreach (var activeTexture in this.activeTextures)
{ {