Fix NullPointerException in RemoveFloorItemTask

This commit is contained in:
Beny 2019-05-15 19:32:47 +01:00
parent 57b13360ce
commit 0e4e492cac

View File

@ -20,6 +20,9 @@ class RemoveFloorItemTask implements Runnable
@Override @Override
public void run() public void run()
{ {
if(this.item == null || this.room == null)
return;
RoomTile tile = this.room.getLayout().getTile(this.item.getX(), this.item.getY()); RoomTile tile = this.room.getLayout().getTile(this.item.getX(), this.item.getY());
this.room.removeHabboItem(this.item); this.room.removeHabboItem(this.item);
this.room.updateTile(tile); this.room.updateTile(tile);