mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-02-19 20:02:35 +01:00
Fix NullPointerException in Room getStackHeight
This commit is contained in:
parent
efe1fd2258
commit
6f4105ceb9
@ -4294,7 +4294,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
|
|||||||
|
|
||||||
public double getStackHeight(short x, short y, boolean calculateHeightmap, HabboItem exclude)
|
public double getStackHeight(short x, short y, boolean calculateHeightmap, HabboItem exclude)
|
||||||
{
|
{
|
||||||
if(x < 0 || y < 0)
|
if(x < 0 || y < 0 || this.layout == null)
|
||||||
return calculateHeightmap ? Short.MAX_VALUE : 0.0;
|
return calculateHeightmap ? Short.MAX_VALUE : 0.0;
|
||||||
|
|
||||||
double height = this.layout.getHeightAtSquare(x, y);
|
double height = this.layout.getHeightAtSquare(x, y);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user