Skip to content

Commit 5b0c719

Browse files
committedJul 21, 2015
Fix crash in mainmenu when loaded subgame does not have a "menu" directory
1 parent 254dbe7 commit 5b0c719

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

Diff for: ‎builtin/mainmenu/textures.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ function mm_texture.set_game(identifier, gamedetails)
144144
end
145145

146146
-- Find out how many randomized textures the subgame provides
147-
local n, filename
147+
local n = 0
148+
local filename
148149
local menu_files = core.get_dir_list(gamedetails.path .. DIR_DELIM .. "menu", false)
149150
for i = 1, #menu_files do
150-
local filename = identifier .. "." .. i .. ".png"
151+
filename = identifier .. "." .. i .. ".png"
151152
if table.indexof(menu_files, filename) == -1 then
152153
n = i - 1
153154
break

0 commit comments

Comments
 (0)
Please sign in to comment.