Skip to content

Commit 7ec2c9e

Browse files
authored
mod-manager.lua: do not except on missing mod metadata
fixes DFHack/dfhack#5489
1 parent 8a2c8e7 commit 7ec2c9e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gui/mod-manager.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,8 @@ function ModlistWindow:refresh_list()
524524
local choices = {}
525525
for idx,mod in ipairs(scriptmanager.get_active_mods()) do
526526
if not include_vanilla and mod.vanilla then goto continue end
527-
local steam_id = scriptmanager.get_mod_info_metadata(mod.path, 'STEAM_FILE_ID').STEAM_FILE_ID
527+
local metadata = scriptmanager.get_mod_info_metadata(mod.path, 'STEAM_FILE_ID')
528+
local steam_id = metadata and metadata.STEAM_FILE_ID or nil
528529
local url = steam_id and (': https://steamcommunity.com/sharedfiles/filedetails/?id=%s'):format(steam_id) or ''
529530
table.insert(choices, {
530531
text={

0 commit comments

Comments
 (0)