Fix NPE in Room

This commit is contained in:
Alejandro 2020-02-08 18:25:44 +02:00
parent 952fd8bd10
commit e596b1231d

View File

@ -2377,6 +2377,9 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
}
public HabboItem getHabboItem(int id) {
if (this.roomItems == null || this.roomSpecialTypes == null)
return null; // room not loaded completely
HabboItem item;
synchronized (this.roomItems) {
item = this.roomItems.get(id);