Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Fix crash on profileless launches
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamblesSM committed Feb 4, 2023
1 parent 897fc33 commit f4e6a7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Configs/Power.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ end
---Updates the currentLevel value.
function Power:updateCurrentLevel()
local profile = _Game:getCurrentProfile()
if not profile then
return
end
if profile:getPowerLevel(self._name) > self.maxLevel then
_Log:printt("Power", "Power "..self._name.." is over max level!")
self.currentLevel = self.maxLevel
Expand Down

0 comments on commit f4e6a7a

Please sign in to comment.