aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/plugin.cpp')
-rw-r--r--engines/scumm/plugin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index 5d37a8609c..cba5b77005 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -1318,14 +1318,18 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) {
}
+ FSList fslist;
FilesystemNode dir;
if (ConfMan.hasKey("path") )
dir = FilesystemNode(ConfMan.get("path"));
- FSList fslist = dir.listDir(FilesystemNode::kListFilesOnly);
- Common::List<DetectorResult> results;
+ if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
+ warning("ScummEngine: invalid game path '%s'", dir.path().c_str());
+ return kInvalidPathError;
+ }
// Invoke the detector, but fixed to the specified gameid.
+ Common::List<DetectorResult> results;
detectGames(fslist, results, gameid);
// Unable to locate game data