fix null error

This commit is contained in:
2025-05-16 10:44:02 +02:00
parent dba8e8fb1e
commit 9ff433c257

View File

@@ -47,8 +47,8 @@ public class World implements Closeable{
public void ejectPiece(Coordinate coordinate) {
PieceEntity entity = getPiece(coordinate);
assert entity != null;
this.entites.remove(entity);
if (entity != null)
this.entites.remove(entity);
setPieceCoords(null, coordinate);
}