Skip to content

Commit

Permalink
Fix race condition with StatsGUI
Browse files Browse the repository at this point in the history
With the 'current' set of changes, it looks like StatsGUI is calling
recordingSensor before TLBE is notified that the player is created. This
causes issues as playerSettings is not yet initialized.
  • Loading branch information
veger committed Nov 7, 2024
1 parent dde9f20 commit eb1c03f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.4

Bugfixes:
- Fix race condition with StatsGUI.
---------------------------------------------------------------------------------------------------
Version: 2.0.3
Date: 29-10-2024
Bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion scripts/camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ end
function Camera.recordingSensor(player)
local playerSettings = storage.playerSettings[player.index]

if not playerSettings.showCameraStatus then
if playerSettings == nil or not playerSettings.showCameraStatus then
return nil
end

Expand Down

0 comments on commit eb1c03f

Please sign in to comment.