Skip to content

Commit

Permalink
Provide more info if a subgame is not valid/found
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno- committed Dec 13, 2014
1 parent ce4ed65 commit 784a452
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Expand Up @@ -1395,6 +1395,12 @@ static bool determine_subgame(GameParams *game_params)
} else { // Otherwise we will be using "minetest"
gamespec = findSubgame(g_settings->get("default_game"));
infostream << "Using default gameid [" << gamespec.id << "]" << std::endl;
if (!gamespec.isValid()) {
errorstream << "Subgame specified in default_game ["
<< g_settings->get("default_game")
<< "] is invalid." << std::endl;
return false;
}
}
} else { // World exists
std::string world_gameid = getWorldGameId(game_params->world_path, false);
Expand Down

0 comments on commit 784a452

Please sign in to comment.