From 9d62f13e3a36e079e9f882aa4062ee6ad69bc181 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 17 Jun 2018 18:07:51 +0200 Subject: BASE: Fix a segfault when mass detector encounters an empty directory Was introduced in the recent detection rework. --- base/plugins.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'base') 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]); } -- cgit v1.2.3