Skip to content

Commit

Permalink
Fix nil pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed Oct 1, 2023
1 parent 02f0688 commit c1cda63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/repository/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ type PlayerSkin struct {
}

func PlayerSkinFromProto(s *commonmodel.PlayerSkin) *PlayerSkin {
if s == nil {
return nil
}

return &PlayerSkin{
Texture: s.Texture,
Signature: s.Signature,
Expand Down

0 comments on commit c1cda63

Please sign in to comment.