mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 04:12:37 +01:00
Fix NullPointerException in Room.java
This commit is contained in:
parent
6a2334ee89
commit
7697765a5c
@ -3633,7 +3633,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
public RoomTile getRandomWalkableTile() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
RoomTile tile = this.layout.getTile((short) (Math.random() * this.layout.getMapSizeX()), (short) (Math.random() * this.layout.getMapSizeY()));
|
||||
if (tile.isWalkable()) {
|
||||
if (tile != null && tile.isWalkable()) {
|
||||
return tile;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user