mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Add null check to avoid NPE
Fixes bug 735
This commit is contained in:
@@ -355,7 +355,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOpponentOf(Player other) {
|
public boolean isOpponentOf(Player other) {
|
||||||
return other != this && ( other.teamNumber < 0 || other.teamNumber != this.teamNumber );
|
return other != this && other != null && ( other.teamNumber < 0 || other.teamNumber != this.teamNumber );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user