api: Null checks
This commit is contained in:
@@ -271,8 +271,16 @@ public class WorldArea
|
|||||||
|
|
||||||
LocalPoint lp = LocalPoint.fromWorld(client, x, y);
|
LocalPoint lp = LocalPoint.fromWorld(client, x, y);
|
||||||
|
|
||||||
int startX = lp.getSceneX() + dx;
|
int startX = 0;
|
||||||
int startY = lp.getSceneY() + dy;
|
if (lp != null)
|
||||||
|
{
|
||||||
|
startX = lp.getSceneX() + dx;
|
||||||
|
}
|
||||||
|
int startY = 0;
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
startY = lp.getSceneY() + dy;
|
||||||
|
}
|
||||||
int checkX = startX + (dx > 0 ? width - 1 : 0);
|
int checkX = startX + (dx > 0 ? width - 1 : 0);
|
||||||
int checkY = startY + (dy > 0 ? height - 1 : 0);
|
int checkY = startY + (dy > 0 ? height - 1 : 0);
|
||||||
int endX = startX + width - 1;
|
int endX = startX + width - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user