Skip to content

Commit

Permalink
Add nil check when inserting ranking queue comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Swan committed Aug 15, 2024
1 parent 9e0cd24 commit fd92cb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/mapset_ranking_queue_comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (c *MapsetRankingQueueComment) AfterFind(*gorm.DB) (err error) {

// Insert Inserts a ranking queue comment into the database
func (c *MapsetRankingQueueComment) Insert() error {
if *c.GameMode <= 0 {
if c.GameMode != nil && *c.GameMode <= 0 {
c.GameMode = nil
}

Expand Down

0 comments on commit fd92cb9

Please sign in to comment.