mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix error if setting menu_last_game is not a valid game
This commit is contained in:
parent
7354d0f3d8
commit
8037eda42c
1 changed files with 13 additions and 10 deletions
|
@ -33,7 +33,9 @@ local function create_world_formspec(dialogdata)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local gamepath = core.get_game(gameidx).path
|
local game_by_gameidx = core.get_game(gameidx)
|
||||||
|
if game_by_gameidx ~= nil then
|
||||||
|
local gamepath = game_by_gameidx.path
|
||||||
local gameconfig = Settings(gamepath.."/game.conf")
|
local gameconfig = Settings(gamepath.."/game.conf")
|
||||||
|
|
||||||
local disallowed_mapgens = (gameconfig:get("disallowed_mapgens") or ""):split()
|
local disallowed_mapgens = (gameconfig:get("disallowed_mapgens") or ""):split()
|
||||||
|
@ -48,6 +50,7 @@ local function create_world_formspec(dialogdata)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local mglist = ""
|
local mglist = ""
|
||||||
local selindex = 1
|
local selindex = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue