do not open resource files from non-open file readers.

This commit is contained in:
Christoph Oelckers 2024-10-19 13:11:48 +02:00 committed by Rachael Alexanderson
parent 131ce183db
commit 6921bf18ce
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -162,6 +162,7 @@ static int nulPrintf(FSMessageLevel msg, const char* fmt, ...)
FResourceFile *FResourceFile::DoOpenResourceFile(const char *filename, FileReader &file, bool containeronly, LumpFilterInfo* filter, FileSystemMessageFunc Printf, StringPool* sp)
{
if (!file.isOpen()) return nullptr;
if (Printf == nullptr) Printf = nulPrintf;
for(auto func : funcs)
{