fix invalid target crash for build using loadable modules

svn-id: r10325
This commit is contained in:
Max Horn 2003-09-20 00:37:09 +00:00
parent 7840039156
commit 3afbb22ad7
4 changed files with 20 additions and 12 deletions

View file

@ -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();