Skip to content

Commit

Permalink
fix: Fixed crash when other mods remove submarine fuel inventory.
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Dec 31, 2024
1 parent 46ef638 commit c1a9110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/submarine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ maraxsis.on_nth_tick(277, function()
end

local fuel_inventory = submarine.get_fuel_inventory()
if fuel_inventory.is_empty() then
if fuel_inventory and fuel_inventory.is_empty() then
for _, player in pairs(submarine.force.players) do
player.add_alert(submarine, defines.alert_type.train_out_of_fuel)
end
Expand Down

0 comments on commit c1a9110

Please sign in to comment.