Skip to content

Commit

Permalink
Fix incorrect disposal pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Mar 11, 2024
1 parent cb0ac0e commit 9539e8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions osu.Framework/Graphics/Veldrid/Textures/VeldridTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ protected virtual TextureUsage Usages

public void Dispose()
{
if (isDisposed)
return;

isDisposed = true;

Dispose(true);
GC.SuppressFinalize(this);
}

protected virtual void Dispose(bool isDisposing)
{
if (isDisposed)
return;

isDisposed = true;

Renderer.ScheduleDisposal(texture =>
{
while (texture.tryGetNextUpload(out var upload))
Expand Down

0 comments on commit 9539e8e

Please sign in to comment.