Keep the texture alive during write.

This commit is contained in:
Ottermandias 2023-08-22 15:18:59 +02:00
parent bc6e9d1d84
commit 00adaca32e

View file

@ -418,6 +418,8 @@ public sealed class TextureManager : SingleTaskQueue, IDisposable
using var w = new BinaryWriter(stream);
header.Write(w);
w.Write(input.Pixels);
// No idea why this is necessary, but it is.
GC.KeepAlive(input);
}
private readonly struct ImageInputData