Skip to content

Commit

Permalink
check for nil onclick before clicky
Browse files Browse the repository at this point in the history
  • Loading branch information
liqMix committed Jul 2, 2024
1 parent 5a268af commit f0cd0a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/game/gamebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func (s *GameStateBuild) Update(g *Game) GameState {
s.FillDudes(g)

// Auto-equip the gear
if len(g.equipment) > 0 {
if len(g.equipment) > 0 && g.ui.equipmentPanel.autoEquipButton.onClick != nil {
g.ui.equipmentPanel.autoEquipButton.onClick()
}
// Auto-sell the remaining gear
Expand Down

0 comments on commit f0cd0a2

Please sign in to comment.