[Scummvm-git-logs] scummvm master -> fb47444a4e56148520c56ba0bee305149803d563

sluicebox noreply at scummvm.org
Sat Jul 22 14:15:44 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fb47444a4e SCI: Add error handling when listing QFG import files


Commit: fb47444a4e56148520c56ba0bee305149803d563
    https://github.com/scummvm/scummvm/commit/fb47444a4e56148520c56ba0bee305149803d563
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-07-22T07:15:13-07:00

Commit Message:
SCI: Add error handling when listing QFG import files

Changed paths:
    engines/sci/engine/file.cpp


diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index 57279810a9d..78b2ed6c141 100644
--- a/engines/sci/engine/file.cpp
+++ b/engines/sci/engine/file.cpp
@@ -511,6 +511,9 @@ void DirSeeker::addAsVirtualFiles(Common::String title, Common::String fileMask)
 			Common::String wrappedFilename = Common::String(regularFilename.c_str() + fileMask.size() - 1);
 
 			Common::SeekableReadStream *testfile = saveFileMan->openForLoading(regularFilename);
+			if (testfile == nullptr) {
+				continue;
+			}
 			int32 testfileSize = testfile->size();
 			delete testfile;
 			if (testfileSize > 1024) // check, if larger than 1k. in that case its a saved game.




More information about the Scummvm-git-logs mailing list