aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorMax Horn2003-09-20 00:37:09 +0000
committerMax Horn2003-09-20 00:37:09 +0000
commit3afbb22ad7ceac7a35256d34c6f1746230098d52 (patch)
treeec226cc448a7fbab056bb96160d983496f6c079e /base/main.cpp
parent7840039156b1ec23e92cfb64f4abd857761b5f97 (diff)
downloadscummvm-rg350-3afbb22ad7ceac7a35256d34c6f1746230098d52.tar.gz
scummvm-rg350-3afbb22ad7ceac7a35256d34c6f1746230098d52.tar.bz2
scummvm-rg350-3afbb22ad7ceac7a35256d34c6f1746230098d52.zip
fix invalid target crash for build using loadable modules
svn-id: r10325
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 247fcb9f9d..6df2ae44a1 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -249,7 +249,7 @@ int main(int argc, char *argv[]) {
launcherDialog(detector, system);
// Verify the given game name
- if (!detector.detectMain()) {
+ if (detector.detectMain()) {
// Set the window caption to the game name
prop.caption = g_config->get("description", detector._gameFileName);
if (prop.caption == NULL)
@@ -265,11 +265,7 @@ int main(int argc, char *argv[]) {
// Create the game engine
Engine *engine = detector.createEngine(system);
-
- // print a message if gameid is invalid
- if (engine == NULL)
- error("%s is an invalid target. Use the -z parameter to list targets",
- detector._gameFileName.c_str());
+ assert(engine);
// Run the game engine
engine->go();