Skip to content

Commit

Permalink
Fix crash when data.stop_ids == nil
Browse files Browse the repository at this point in the history
Cause unclear, probably bad migration from older version. Added
workaround by checking if data.stop_ids ~= nil before using it.
  • Loading branch information
eduran84 committed Jun 10, 2019
1 parent a457bed commit 7e1213c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---------------------------------------------------------------------------------------------------
Version: 0.10.9
Date: 2019-06-10

Bugfixes:
- Fixed crash on placing first LTN stop (https://mods.factorio.com/mod/LTN_Tracker/discussion/5cfd4f17d9e222000bc70d44)

---------------------------------------------------------------------------------------------------
Version: 0.10.8
Date: 2019-04-28
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LTN_Tracker",
"version": "0.10.8",
"version": "0.10.9",
"title": "LTN Tracker",
"author": "eduran",
"contact": "https://forums.factorio.com/memberlist.php?mode=viewprofile&u=1699",
Expand Down
3 changes: 1 addition & 2 deletions script/data_processing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ local function update_stops(stop_id) -- state 1
end

local function check_for_new_stops()
if not data.stop_ids then log2(data) end
for _, stop_id in pairs(data.stop_ids) do
for _, stop_id in pairs(data.stop_ids or {}) do
if not raw.stops[stop_id] then
ui.clear_station_filter()
break
Expand Down

0 comments on commit 7e1213c

Please sign in to comment.