Skip to content

Commit

Permalink
Make relationship loading null safe, assume enemy if relationship is …
Browse files Browse the repository at this point in the history
…unknown.
  • Loading branch information
sgift committed Jul 7, 2024
1 parent 7b76fec commit 4636f71
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ public User.Relation beziehungVon(int otherUserId)
var userRelations = getUserRelationData();

var relation = userRelations.get(otherUserId);

if(relation == null) {
return User.Relation.ENEMY;
}
return User.getRelation(relation.getRelationFrom());
}
}

0 comments on commit 4636f71

Please sign in to comment.