Skip to content

Commit

Permalink
Scanner: fix a rare crash which can occur if upgrading past an update…
Browse files Browse the repository at this point in the history
… which resets the surface state
  • Loading branch information
ahicks92 committed Oct 28, 2024
1 parent 55470b3 commit 8cbd410
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/scanner/entrypoint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ local function move_in_subcategory(pindex, ps, dir)

if
not ps.scanner_cursor.category
-- Can happen on the first scan of a save after an update which wipes out
-- state.
or not ps.entries[ps.scanner_cursor.category]
or not next(ps.entries[ps.scanner_cursor.category])
or not ps.entries[ps.scanner_cursor.category][ps.scanner_cursor.subcategory_index]
then
Expand Down

0 comments on commit 8cbd410

Please sign in to comment.