Skip to content
Snippets Groups Projects
Commit 5b0c7191 authored by sfan5's avatar sfan5
Browse files

Fix crash in mainmenu when loaded subgame does not have a "menu" directory

parent 254dbe7a
No related branches found
No related tags found
No related merge requests found
......@@ -144,10 +144,11 @@ function mm_texture.set_game(identifier, gamedetails)
end
-- Find out how many randomized textures the subgame provides
local n, filename
local n = 0
local filename
local menu_files = core.get_dir_list(gamedetails.path .. DIR_DELIM .. "menu", false)
for i = 1, #menu_files do
local filename = identifier .. "." .. i .. ".png"
filename = identifier .. "." .. i .. ".png"
if table.indexof(menu_files, filename) == -1 then
n = i - 1
break
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment