} 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);