From 31089578129fc810188277eb546715e5409fb124 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 18 Sep 2017 23:54:16 +0200 Subject: CGE2: Clean up SearchMan after fallbackDetect --- engines/cge2/detection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/cge2') diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp index 5a4f286d5b..d05dfffedc 100644 --- a/engines/cge2/detection.cpp +++ b/engines/cge2/detection.cpp @@ -157,13 +157,14 @@ const ADGameDescription *CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, if (!game) return 0; - SearchMan.clear(); - SearchMan.addDirectory(fslist.begin()->getParent().getPath(), fslist.begin()->getParent()); + SearchMan.addDirectory("CGE2MetaEngine::fallbackDetect", fslist.begin()->getParent()); ResourceManager *resman; resman = new ResourceManager(); bool result = resman->exist("CGE.SAY"); delete resman; + SearchMan.remove("CGE2MetaEngine::fallbackDetect"); + if (!result) return 0; -- cgit v1.2.3