mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 12:44:16 +01:00
Suppress DAssetM dispose exceptions (#1707)
Whether an asset being unavailable should be an error is decided on Dalamud startup time. This suppresses assets unavailable exceptions on Dispose.
This commit is contained in:
parent
7ee20272de
commit
666feede4c
1 changed files with 2 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ internal sealed class DalamudAssetManager : IServiceType, IDisposable, IDalamudA
|
||||||
.Where(x => x is not DalamudAsset.Empty4X4)
|
.Where(x => x is not DalamudAsset.Empty4X4)
|
||||||
.Where(x => x.GetAttribute<DalamudAssetAttribute>()?.Required is false)
|
.Where(x => x.GetAttribute<DalamudAssetAttribute>()?.Required is false)
|
||||||
.Select(this.CreateStreamAsync)
|
.Select(this.CreateStreamAsync)
|
||||||
.Select(x => x.ToContentDisposedTask()))
|
.Select(x => x.ToContentDisposedTask(true)))
|
||||||
.ContinueWith(r => Log.Verbose($"Optional assets load state: {r}"));
|
.ContinueWith(r => Log.Verbose($"Optional assets load state: {r}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,6 +99,7 @@ internal sealed class DalamudAssetManager : IServiceType, IDisposable, IDalamudA
|
||||||
.Concat(this.fileStreams.Values)
|
.Concat(this.fileStreams.Values)
|
||||||
.Concat(this.textureWraps.Values)
|
.Concat(this.textureWraps.Values)
|
||||||
.Where(x => x is not null)
|
.Where(x => x is not null)
|
||||||
|
.Select(x => x.ContinueWith(r => { _ = r.Exception; }))
|
||||||
.ToArray());
|
.ToArray());
|
||||||
this.scopedFinalizer.Dispose();
|
this.scopedFinalizer.Dispose();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue