Skip to content

Commit

Permalink
Fix crash updating gametype without game
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and sapier committed Nov 9, 2013
1 parent 1afd359 commit 7bd30b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin/mainmenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1191,12 +1191,13 @@ end

--------------------------------------------------------------------------------
function menu.update_gametype(reset)
if reset then
local game = menu.lastgame()

if reset or game == nil then
mm_texture.reset()
engine.set_topleft_text("")
filterlist.set_filtercriteria(worldlist,nil)
else
local game = menu.lastgame()
mm_texture.update(tabbuilder.current_tab,game)
engine.set_topleft_text(game.name)
filterlist.set_filtercriteria(worldlist,game.id)
Expand Down

0 comments on commit 7bd30b5

Please sign in to comment.