fixed crash on trying to read from a mounted directory's content.

This commit is contained in:
Christoph Oelckers 2023-12-19 19:01:30 +01:00
parent 3b44c50dfd
commit 27da9b6b79

View file

@ -711,7 +711,7 @@ FileReader FResourceFile::GetEntryReader(uint32_t entry, int readertype, int rea
FileData FResourceFile::Read(int entry)
{
if (!(Entries[entry].Flags & RESFF_COMPRESSED))
if (!(Entries[entry].Flags & RESFF_COMPRESSED) && Reader.isOpen())
{
auto buf = Reader.GetBuffer();
// if this is backed by a memory buffer, we can just return a reference to the backing store.