fixed crash with files from directories.

This commit is contained in:
Christoph Oelckers 2023-12-19 19:09:35 +01:00
parent 273f7c55bc
commit d11bf52831

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.