diff options
author | Bastien Bouclet | 2018-06-17 18:07:51 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-06-17 18:09:40 +0200 |
commit | 9d62f13e3a36e079e9f882aa4062ee6ad69bc181 (patch) | |
tree | afd322c6cb07135514d64e900e01517f90bfcecc /base | |
parent | ff66a89e14f603381f4dd8cbfa64674bfd4d1c11 (diff) | |
download | scummvm-rg350-9d62f13e3a36e079e9f882aa4062ee6ad69bc181.tar.gz scummvm-rg350-9d62f13e3a36e079e9f882aa4062ee6ad69bc181.tar.bz2 scummvm-rg350-9d62f13e3a36e079e9f882aa4062ee6ad69bc181.zip |
BASE: Fix a segfault when mass detector encounters an empty directory
Was introduced in the recent detection rework.
Diffstat (limited to 'base')
-rw-r--r-- | base/plugins.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/base/plugins.cpp b/base/plugins.cpp index 023f2f3bb3..f6bbeacf74 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -515,7 +515,6 @@ PlainGameDescriptor EngineManager::findGameInLoadedPlugins(const Common::String DetectionResults EngineManager::detectGames(const Common::FSList &fslist) const { DetectedGames candidates; - Common::String path = fslist.begin()->getParent().getPath(); PluginList plugins; PluginList::const_iterator iter; PluginManager::instance().loadFirstPlugin(); @@ -529,7 +528,7 @@ DetectionResults EngineManager::detectGames(const Common::FSList &fslist) const for (uint i = 0; i < engineCandidates.size(); i++) { engineCandidates[i].engineName = metaEngine.getName(); - engineCandidates[i].path = path; + engineCandidates[i].path = fslist.begin()->getParent().getPath(); candidates.push_back(engineCandidates[i]); } |