From 8e3ddcf84f459154090451ae5ebfcfed3b09f068 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 7 Mar 2003 00:52:45 +0000 Subject: exit cleanly if invalid target is specified svn-id: r6727 --- common/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/main.cpp') 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(); -- cgit v1.2.3