mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Fixed a NullPointerException
This commit is contained in:
parent
9b15464fd1
commit
2e6d2b69a9
@ -1718,8 +1718,9 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
|
|||||||
boolean isRiding = false;
|
boolean isRiding = false;
|
||||||
if(unit.getRoomUnitType() == RoomUnitType.USER) {
|
if(unit.getRoomUnitType() == RoomUnitType.USER) {
|
||||||
Habbo rollingHabbo = this.getHabbo(unit);
|
Habbo rollingHabbo = this.getHabbo(unit);
|
||||||
|
if(rollingHabbo != null && rollingHabbo.getHabboInfo() != null) {
|
||||||
RideablePet riding = rollingHabbo.getHabboInfo().getRiding();
|
RideablePet riding = rollingHabbo.getHabboInfo().getRiding();
|
||||||
if(riding != null) {
|
if (riding != null) {
|
||||||
RoomUnit ridingUnit = riding.getRoomUnit();
|
RoomUnit ridingUnit = riding.getRoomUnit();
|
||||||
tile.setStackHeight(ridingUnit.getZ() + zOffset);
|
tile.setStackHeight(ridingUnit.getZ() + zOffset);
|
||||||
rolledUnitIds.add(ridingUnit.getId());
|
rolledUnitIds.add(ridingUnit.getId());
|
||||||
@ -1728,6 +1729,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
|
|||||||
isRiding = true;
|
isRiding = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rolledUnitIds.add(unit.getId());
|
rolledUnitIds.add(unit.getId());
|
||||||
updatedUnit.remove(unit);
|
updatedUnit.remove(unit);
|
||||||
|
Loading…
Reference in New Issue
Block a user