Fix an exception on broken mods.

This commit is contained in:
Ottermandias 2022-07-21 22:54:27 +02:00
parent f1d9757077
commit 9cb6084d31

View file

@ -282,6 +282,11 @@ public class PenumbraSqPackStream : IDisposable
private void ReadTextureFile( PenumbraFileResource resource, MemoryStream ms )
{
if( resource.FileInfo!.BlockCount == 0 )
{
return;
}
var blocks = Reader.ReadStructures< LodBlock >( ( int )resource.FileInfo!.BlockCount );
// if there is a mipmap header, the comp_offset