-
-
Save Zeno-/642751186ad8e029efd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From bbdd7789f1968e8bfe910e29bbc305c1145eead0 Mon Sep 17 00:00:00 2001 | |
From: Craig Robbins <kde.psych@gmail.com> | |
Date: Sat, 13 Dec 2014 22:34:34 +1000 | |
Subject: [PATCH] Provide more info if a subgame is not valid/found | |
--- | |
src/main.cpp | 6 ++++++ | |
1 file changed, 6 insertions(+) | |
diff --git a/src/main.cpp b/src/main.cpp | |
index d9fa8fa..d7828ea 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); | |
-- | |
1.9.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment