forked from Mirrorlandia_minetest/minetest
Fix crash updating gametype without game
This commit is contained in:
parent
1afd359550
commit
7bd30b59ee
@ -1191,12 +1191,13 @@ end
|
|||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
function menu.update_gametype(reset)
|
function menu.update_gametype(reset)
|
||||||
if reset then
|
local game = menu.lastgame()
|
||||||
|
|
||||||
|
if reset or game == nil then
|
||||||
mm_texture.reset()
|
mm_texture.reset()
|
||||||
engine.set_topleft_text("")
|
engine.set_topleft_text("")
|
||||||
filterlist.set_filtercriteria(worldlist,nil)
|
filterlist.set_filtercriteria(worldlist,nil)
|
||||||
else
|
else
|
||||||
local game = menu.lastgame()
|
|
||||||
mm_texture.update(tabbuilder.current_tab,game)
|
mm_texture.update(tabbuilder.current_tab,game)
|
||||||
engine.set_topleft_text(game.name)
|
engine.set_topleft_text(game.name)
|
||||||
filterlist.set_filtercriteria(worldlist,game.id)
|
filterlist.set_filtercriteria(worldlist,game.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user