Skip to content

Commit

Permalink
CGE: Clean up SearchMan after fallbackDetect
Browse files Browse the repository at this point in the history
  • Loading branch information
wjp committed Sep 20, 2017
1 parent 6bea267 commit ca82bf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/cge/detection.cpp
Expand Up @@ -159,13 +159,14 @@ const ADGameDescription *CGEMetaEngine::fallbackDetect(const FileMap &allFiles,
if (!game)
return nullptr;

SearchMan.clear();
SearchMan.addDirectory(fslist.begin()->getParent().getPath(), fslist.begin()->getParent());
SearchMan.addDirectory("CGEMetaEngine::fallbackDetect", fslist.begin()->getParent());
ResourceManager *resman;
resman = new ResourceManager();
bool result = resman->exist("CGE.SAY");
delete resman;

SearchMan.remove("CGEMetaEngine::fallbackDetect");

if (!result)
return nullptr;

Expand Down

0 comments on commit ca82bf6

Please sign in to comment.