Skip to content

Commit

Permalink
Fix a crash while using JPROFILER
Browse files Browse the repository at this point in the history
  • Loading branch information
quentin452 committed Mar 25, 2024
1 parent 5068d0d commit afefba8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/gamestateshandling/!PlayingOrSetGameState.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ function IsCurrentGameState(state)
end

function SetCurrentGameState(state)
_JPROFILER.push("SetCurrentGameState")

if LuaCraftCurrentGameState and LuaCraftCurrentGameState.resetMenuSelection then
LuaCraftCurrentGameState:resetMenuSelection()
end
Expand All @@ -20,4 +22,5 @@ function SetCurrentGameState(state)
end
LuaCraftCurrentGameState = state
LuaCraftCurrentGameState:resizeMenu()
_JPROFILER.pop("SetCurrentGameState")
end

0 comments on commit afefba8

Please sign in to comment.