Nullify FileTransferStreamHandlerExtensions

This commit is contained in:
Jordan Dominion
2023-11-24 15:23:46 -05:00
parent 6a53712175
commit 33e7d6c3af
@@ -14,8 +14,6 @@ using Tgstation.Server.Api.Models.Response;
using Tgstation.Server.Host.Controllers.Results;
using Tgstation.Server.Host.Transfer;
#nullable disable
namespace Tgstation.Server.Host.Extensions
{
/// <summary>
@@ -69,7 +67,9 @@ namespace Tgstation.Server.Host.Extensions
}
catch
{
await stream.DisposeAsync();
if (stream != null)
await stream.DisposeAsync();
throw;
}
}