mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fix NullPointerException in RoomRelativeMapComposer
This commit is contained in:
parent
7e9eb84d39
commit
766fa148d0
@ -19,7 +19,7 @@ public class UpdateItemsCommand extends Command {
|
|||||||
|
|
||||||
synchronized (Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
synchronized (Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
||||||
for (Room room : Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
for (Room room : Emulator.getGameEnvironment().getRoomManager().getActiveRooms()) {
|
||||||
if (room.isLoaded() && room.getUserCount() > 0) {
|
if (room.isLoaded() && room.getUserCount() > 0 && room.getLayout() != null) {
|
||||||
room.sendComposer(new RoomRelativeMapComposer(room).compose());
|
room.sendComposer(new RoomRelativeMapComposer(room).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ public class RequestRoomHeightmapEvent extends MessageHandler {
|
|||||||
if (this.client.getHabbo().getHabboInfo().getLoadingRoom() > 0) {
|
if (this.client.getHabbo().getHabboInfo().getLoadingRoom() > 0) {
|
||||||
Room room = Emulator.getGameEnvironment().getRoomManager().loadRoom(this.client.getHabbo().getHabboInfo().getLoadingRoom());
|
Room room = Emulator.getGameEnvironment().getRoomManager().loadRoom(this.client.getHabbo().getHabboInfo().getLoadingRoom());
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null && room.getLayout() != null) {
|
||||||
this.client.sendResponse(new RoomRelativeMapComposer(room));
|
this.client.sendResponse(new RoomRelativeMapComposer(room));
|
||||||
|
|
||||||
this.client.sendResponse(new RoomHeightMapComposer(room));
|
this.client.sendResponse(new RoomHeightMapComposer(room));
|
||||||
|
Loading…
Reference in New Issue
Block a user