aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-12-13 23:01:16 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-12-13 23:01:16 +1000
commit784a452ed52ca3a8b46997c7f787b04a3a07b7d5 (patch)
treed6b11ddde2446672b96a296a52850050917b2e35
parentce4ed65a3948648b9baaabe205ddef0acd101b29 (diff)
downloadminetest-784a452ed52ca3a8b46997c7f787b04a3a07b7d5.tar.gz
minetest-784a452ed52ca3a8b46997c7f787b04a3a07b7d5.tar.bz2
minetest-784a452ed52ca3a8b46997c7f787b04a3a07b7d5.zip
Provide more info if a subgame is not valid/found
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d9fa8faa2..73964c2b0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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);