aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJonathan Gray2003-03-07 00:52:45 +0000
committerJonathan Gray2003-03-07 00:52:45 +0000
commit8e3ddcf84f459154090451ae5ebfcfed3b09f068 (patch)
tree5d844d62c80b761cd9a97cb96357ac22783d72d8 /common
parentaa3766018f63b45e70fabf77878de70c43c33375 (diff)
downloadscummvm-rg350-8e3ddcf84f459154090451ae5ebfcfed3b09f068.tar.gz
scummvm-rg350-8e3ddcf84f459154090451ae5ebfcfed3b09f068.tar.bz2
scummvm-rg350-8e3ddcf84f459154090451ae5ebfcfed3b09f068.zip
exit cleanly if invalid target is specified
svn-id: r6727
Diffstat (limited to 'common')
-rw-r--r--common/main.cpp5
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();