diff options
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index f97d0adf62..7356988048 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -565,6 +565,12 @@ int main(int argc, char *argv[]) { unusedFiles.clear(); + // Short circuit, in case no games are found. + if (games.empty()) { + printf("No games found. Exiting prematurely\n"); + return -1; + } + // Process all games found for (GameMap::const_iterator i = games.begin(); i != games.end(); ++i) { MD5Map::const_iterator f1 = inputFiles.find(i->first->md5[0]); |