diff options
author | Jonathan Gray | 2003-03-07 00:52:45 +0000 |
---|---|---|
committer | Jonathan Gray | 2003-03-07 00:52:45 +0000 |
commit | 8e3ddcf84f459154090451ae5ebfcfed3b09f068 (patch) | |
tree | 5d844d62c80b761cd9a97cb96357ac22783d72d8 | |
parent | aa3766018f63b45e70fabf77878de70c43c33375 (diff) | |
download | scummvm-rg350-8e3ddcf84f459154090451ae5ebfcfed3b09f068.tar.gz scummvm-rg350-8e3ddcf84f459154090451ae5ebfcfed3b09f068.tar.bz2 scummvm-rg350-8e3ddcf84f459154090451ae5ebfcfed3b09f068.zip |
exit cleanly if invalid target is specified
svn-id: r6727
-rw-r--r-- | common/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/main.cpp b/common/main.cpp index eb898eab27..baaf9a5312 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -200,6 +200,11 @@ int main(int argc, char *argv[]) { // Create the game engine Engine *engine = Engine::createFromDetector(&detector, system); + // print a message if gameid is invalid + if (engine == NULL) + error("%s is an invalid target. Use the -z parameter to list targets\n", + detector._gameFileName.c_str()); + // Run the game engine engine->go(); |