From d11bf52831079d78c87ef7baac44d009b6abf7e6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 19 Dec 2023 19:09:35 +0100 Subject: [PATCH] fixed crash with files from directories. --- src/common/filesystem/source/resourcefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/filesystem/source/resourcefile.cpp b/src/common/filesystem/source/resourcefile.cpp index 6b284cc28..3483bc64c 100644 --- a/src/common/filesystem/source/resourcefile.cpp +++ b/src/common/filesystem/source/resourcefile.cpp @@ -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.