diff options
author | Eugene Sandulenko | 2016-08-17 11:34:19 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-17 11:34:19 +0200 |
commit | 76d54357812675cfdf3ef4a7f898df3df3919834 (patch) | |
tree | b11ef7d1895f534bf627ca3bf2e5444da2e8ceb3 | |
parent | 263588e97e9e32825864a83e28f31ad6c6241dca (diff) | |
download | scummvm-rg350-76d54357812675cfdf3ef4a7f898df3df3919834.tar.gz scummvm-rg350-76d54357812675cfdf3ef4a7f898df3df3919834.tar.bz2 scummvm-rg350-76d54357812675cfdf3ef4a7f898df3df3919834.zip |
DIRECTOR: Optimize code flow for directory scanning
-rw-r--r-- | engines/director/director.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index b787935f8e..ddc5adccdd 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -141,7 +141,8 @@ Common::HashMap<Common::String, Score *> DirectorEngine::loadMMMNames(Common::St Common::FSList movies; Common::HashMap<Common::String, Score *> nameMap; - directory.getChildren(movies, Common::FSNode::kListFilesOnly); + if (!directory.getChildren(movies, Common::FSNode::kListFilesOnly)) + return nameMap; if (!movies.empty()) { for (Common::FSList::const_iterator i = movies.begin(); i != movies.end(); ++i) { |